agora icon indicating copy to clipboard operation
agora copied to clipboard

Node logs are printed multiple times in integration and unittests

Open Geod24 opened this issue 3 years ago • 1 comments

When doing integration test, since we use spawnProcess, stdout is piped: https://github.com/bosagora/agora/blob/c58e135df9d7c5fd6c0580e33609e1395e05443c/ci/system_integration_test.d#L74

But then, we also print the logs afterwards: https://github.com/bosagora/agora/blob/c58e135df9d7c5fd6c0580e33609e1395e05443c/ci/system_integration_test.d#L82-L95

I think we should only keep the later, as the first provides interleaved output.

In unittests, we only will print it twice if a node triggers an assertion, because first this will trigger: https://github.com/bosagora/agora/blob/c58e135df9d7c5fd6c0580e33609e1395e05443c/source/agora/test/Base.d#L129

Then we usually have the following: https://github.com/bosagora/agora/blob/c58e135df9d7c5fd6c0580e33609e1395e05443c/source/agora/test/Simple.d#L37

Geod24 avatar Apr 18 '21 10:04 Geod24