You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before #171 and the csapi package was added, I was able to run Complement tests and see the log output as it runs. But nowadays, all of the test log output is buffered and only printed when all of the tests finish.
This is caused by Go deciding to not stream log output when there are multiple packages present (we have tests and csapi in the ./tests/... directory):
As a workaround, I can get the log streaming behavior I want by being very selective about the files to run: go test -v -run TestImportHistoricalMessages ./tests/main_test.go ./tests/msc2716_test.go but this is manual process adjusting our generic Synapse test runner every time.
Potential solutions
Move all tests to the tests package.
Just wait for upstream Go changes although there is a possibility this won't change and just the documentation will be updated with this caveat
Run each test package in their own process to still get parallel but still get stream output
Before #171 and the
csapipackage was added, I was able to run Complement tests and see the log output as it runs. But nowadays, all of the test log output is buffered and only printed when all of the tests finish.This is caused by Go deciding to not stream log output when there are multiple packages present (we have
testsandcsapiin the./tests/...directory):Related:
I liked the streaming behavior before to see the test progress but it's also important when I try to hook up Element to the homeserver and rooms from Complement to be able to see the log output of room ID's, etc to join and inspect, https://github.com/matrix-org/complement/blob/master/ONBOARDING.md#how-do-i-hook-up-a-matrix-client-like-element-to-the-homeservers-spun-up-by-complement-after-a-test-runs
As a workaround, I can get the log streaming behavior I want by being very selective about the files to run:
go test -v -run TestImportHistoricalMessages ./tests/main_test.go ./tests/msc2716_test.gobut this is manual process adjusting our generic Synapse test runner every time.Potential solutions
testspackage.