Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Show cluster logs on failure for 21million systest. (#5507)
test-21million.sh can show failures like the following in CI builds: ``` ------- Stdout: ------- === RUN TestQueries/query-044 --- FAIL: TestQueries/query-044 (4.74s) run_test.go:86: Error Trace: run_test.go:86 Error: Received unexpected error: rpc error: code = Unknown desc = : rpc error: code = Unavailable desc = transport is closing Test: TestQueries/query-044 ``` ``` ------- Stdout: ------- === RUN TestQueries/query-045 --- FAIL: TestQueries/query-045 (0.01s) run_test.go:86: Error Trace: run_test.go:86 Error: Received unexpected error: rpc error: code = Unknown desc = : rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 172.24.0.4:7182: connect: connection refused" Test: TestQueries/query-045 ``` It looks like something happened to the Dgraph cluster, but we're lost without any cluster logs. This change prints out the cluster logs for alpha1, alpha2, alpha3, and zero1 if there are test failures in test-21million.sh. Changes * Print out cluster logs on test failure * Move cluster tear down to the very end of the test so logs can be captured beforehand.
- Loading branch information