-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print container logs when integration test fails (#1127)
We see (relatively rarely) integration tests being flaky. In those cases of flakiness the current logging is not sufficient to really understand the cause of the problem. This PR aims to improve logging by printing logs of all containers when a test fails. `printContainerLogs` is added to `Containers.Cleanup()` code to print the logs of containers. Additionally, the `Cleanup()` function is now **always** called, even if the containers failed to start or tests failed. To make sure it can print some logs: - the code now has less panics, which would have prevented `Cleanup()` from running - in `setupClickHouse()` and others we return the container object in case container failed to start instead of `nil` (but still with error) to be able to recover some logs - if one container fails to start, `Containers` is now returned partially filled (but still with error), so that we can print some logs instead of giving up entirely --------- Signed-off-by: Piotr Grabowski <[email protected]> Co-authored-by: Jacek Migdal <[email protected]>
- Loading branch information
1 parent
cb7b0cf
commit 1a78cdf
Showing
11 changed files
with
137 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.