test: fix testSendReceiveTwo and testBatchNack#270
test: fix testSendReceiveTwo and testBatchNack#270roseyang62 wants to merge 60 commits intosalesforce:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #270 +/- ##
============================================
- Coverage 82.36% 82.25% -0.12%
Complexity 625 625
============================================
Files 191 191
Lines 11503 11503
Branches 1525 1525
============================================
- Hits 9475 9462 -13
- Misses 1357 1370 +13
Partials 671 671
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…com/roseyang62/multicloudj into investigate-pubsub-conformance-test
| // replay mode: An exception is thrown even when the timeout has not occurred. | ||
| String wireMockError = TestsUtil.getWireMockUnmatchedRequestsError(); | ||
| String errorMsg = String.format( | ||
| "Failed to receive messages: Got exception after receiving %d/%d messages.%n%n" + | ||
| "WireMock Error Details:%n%s", | ||
| received.size(), expectedCount, wireMockError != null ? wireMockError : "No unmatched requests"); | ||
| throw new AssertionError(errorMsg, e); |
There was a problem hiding this comment.
Bringing WireMock into the test logic crosses the intended abstraction boundary. We should keep it only setup phase as in the current code and ensure the tests remain independent of the record/replay mechanism.
f080175 to
f33c0da
Compare
ffcf472 to
0facde9
Compare
|
Brief analysis of the root cause.
The issue is related to how scenarios are handled in WireMock.
After fixing, all recent CI runs have passed. I am not confident whether this fully resolves the underlying issue or simply reduces the likelihood of failure. |
Summary
This PR fixes flaky PubSub testSendReceiveTwo and testBatchNack conformance tests that were timing out in CI intermittently.
Some conventions to follow
docstore:for document store module,blobstorefor Blob Store moduletest:perf: