Skip to content

Commit

Permalink
Don't log to file in CI (#1129)
Browse files Browse the repository at this point in the history
Motivation:

The connection backoff interop test periodically fails in CI when
tearing down. In CI we currently capture the logs to file, this isn't
too sensible: we can't access them from Travis.

Modifications:

- Don't log interop test output to file in CI
- Print all thrown errors in the connection backoff interop test

Result:

Some visibilitiy into why the test is occasionally failing
  • Loading branch information
glbrntt authored Feb 4, 2021
1 parent 7cb82cd commit 9e464a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .travis-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ run_interop_tests() {
$BUILD_OUTPUT/GRPCInteroperabilityTests run-test \
--host "localhost" \
--port "$INTEROP_TEST_SERVER_PORT" \
"$test" \
2> "interop.$test.log"
"$test"
success "PASSED $test"
done

Expand Down Expand Up @@ -143,8 +142,7 @@ run_interop_reconnect_test() {
# Run the test; logs are written to stderr, redirect them to a file.
${BUILD_OUTPUT}/GRPCConnectionBackoffInteropTest \
--control-port ${INTEROP_TEST_SERVER_CONTROL_PORT} \
--retry-port ${INTEROP_TEST_SERVER_RETRY_PORT} \
2> "interop.connection_backoff.log"
--retry-port ${INTEROP_TEST_SERVER_RETRY_PORT}
success "connection backoff interop test PASSED"

info "Stopping C++ reconnect interop server"
Expand Down
7 changes: 6 additions & 1 deletion Sources/GRPCConnectionBackoffInteropTest/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ struct ConnectionBackoffInteropTest: ParsableCommand {
var retryPort: Int

func run() throws {
try runTest(controlPort: self.controlPort, retryPort: self.retryPort)
do {
try runTest(controlPort: self.controlPort, retryPort: self.retryPort)
} catch {
print("[\(Date())] Unexpected error: \(error)")
throw error
}
}
}

Expand Down

0 comments on commit 9e464a7

Please sign in to comment.