Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interop-testing: add soak test cases to interop client #4677

Merged
merged 10 commits into from
Sep 9, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix logs
  • Loading branch information
apolcyn committed Sep 1, 2021
commit 284f399cd0c9dce9b0e27f0b59457df6733a69d3
6 changes: 3 additions & 3 deletions interop/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,11 +751,11 @@ func DoSoakTest(tc testgrpc.TestServiceClient, serverAddr string, dopts []grpc.D
fmt.Fprintln(os.Stderr, "Histogram of per-iteration latencies in milliseconds:")
fmt.Fprintln(os.Stderr, b.String())
if len(results) < soakIterations {
fmt.Fprintf(os.Stderr, "soak test consumed all %f seconds of time and quit early, only having ran %d out of desired %d iterations. total failures: %d. max failures threshold: %d. Some or all of the iterations that did run were unexpectedly slow. See breakdown above for which iterations succeeded, failed, and why for more info.\n", overallDeadline.Sub(start).Seconds(), len(results), soakIterations, totalFailures, maxFailures)
logger.Fatalf("soak test consumed all %f seconds of time and quit early, only having ran %d out of desired %d iterations. total failures: %d. max failures threshold: %d. Some or all of the iterations that did run were unexpectedly slow. See breakdown above for which iterations succeeded, failed, and why for more info.", overallDeadline.Sub(start).Seconds(), len(results), soakIterations, totalFailures, maxFailures)
} else if totalFailures > maxFailures {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This else if and the next else are unnecessary.
Fatalf() will exit anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

fmt.Fprintf(os.Stderr, "soak test ran: %d iterations. total failures: %d exceeds max failures threshold: %d. See breakdown above for which iterations succeeded, failed, and why for more info.\n", soakIterations, totalFailures, maxFailures)
logger.Fatalf("soak test ran: %d iterations. total failures: %d exceeds max failures threshold: %d. See breakdown above for which iterations succeeded, failed, and why for more info.", soakIterations, totalFailures, maxFailures)
} else {
fmt.Fprintf(os.Stderr, "soak test ran: %d iterations. total failures: %d is within max failures threshold: %d. See breakdown above for which iterations succeeded, failed, and why for more info.\n", soakIterations, totalFailures, maxFailures)
fmt.Fprintln(os.Stderr, "soak test ran: %d iterations. total failures: %d is within max failures threshold: %d. See breakdown above for which iterations succeeded, failed, and why for more info.\n", soakIterations, totalFailures, maxFailures)
}
}

Expand Down