-
Notifications
You must be signed in to change notification settings - Fork 15
REP-5306 Migrate integration tests to use externally-provisioned clusters. #48
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
REP-5306 Migrate integration tests to use externally-provisioned clusters. #48
Conversation
tdq45gj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % one comment
| task := VerificationTask{QueryFilter: qfilter} | ||
|
|
||
| verifier := NewVerifier(VerifierSettings{}) | ||
| //verifier.SetStartClean(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended to be commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s the way it is upstream, curiously enough.
Previously to finalize its change stream the verifier would just TryNext() until no responses arrived. This works fine for unsharded clusters, but for sharded clusters it can potentially miss events. This changeset adopts more “tried-and-true” logic: grab a timestamp via `appendOplogNote`, then iterate the change stream until the stream’s resume token’s timestamp meets or exceeds that timestamp. As verification of that change, this changeset removes the test skips that REP-5306 (PR #48) imposed for sharded clusters. The timestamp-grabbing logic is unconditionally retryable, which requires an update to the retryer module to implement. This changeset refactors that module a bit to prevent further duplication. Additional changes: - go.sum is now part of the repo. - Go 1.22 is now a minimum requirement. - Tests no longer spew output when the worker delay is 0. The log message for that delay is also tweaked to show the delay. - Mention in code of the defunct “refetch” collection is removed. - The change stream no longer logs whenever a batch of events arrives. For busy migrations it would be excessive. - Verifier instances in tests now wait 10ms rather than 15s between generations, which makes a few tests much quicker. - A new CheckRunner improves the ergonomics of running CheckDriver in tests. - TestGenerationalRechecking used to verify that an insert after WritesOff() gets handled as a recheck. This doesn’t make a lot of sense since WritesOff() means, by definition, that no more events should happen on the server. Thus, this changeset removes that test, which was proving rather race-prone with the rest of these changes. - The tests now use majority read & write concern. - CI now parallelizes a bit more of its setup. - A new CheckRunner struct smooths over running Check from e2e tests. - Tests now use a 10ms verificationStatusCheckInterval rather than 15-minute.
This project’s test suite has been provisioning its own clusters via custom logic. That logic can’t provision sharded clusters, though.
REP-5299 (PR #47) documents a fix for sharding. To test that ticket’s fix we need to run the test suite against sharded clusters. Thus, this changeset:
Additional notes/changes:
stableversion. There’s little reason to retain compatibility with prior Go releases.timestampTimerather thanclockTime.util.