Repository navigation
Conversation
test_changeStream_early_start looked up the oldest oplog entry for every parametrized case, before running the change-stream command. Only oldest_minus_5s uses that value; zero, one_zero and max_increment use static start times. On a target with no readable oplog entry the lookup raises StopIteration, so those three cases never reach the server and record nothing about whether an early startAtOperationTime is accepted. Pass compute_start a callable that performs the lookup, so the oplog is read only by the case that uses it. Signed-off-by: Samar Farooqi <samafarc@amazon.com>
Amazon DocumentDB does not expose its replication log as local.oplog.rs: reading the oldest entry returns no document. The amazon-documentdb profile declared the oplog capability anyway, so oplog-dependent cases ran and failed in test code rather than being gated. Remove oplog from the profile and mark the oldest_minus_5s case of test_changeStream_early_start with requires(oplog=True), the one case that reads the oplog. The two collMod oplog cases (max_target_oplog, size_target_oplog) are already gated on oplog and are now skipped on Amazon DocumentDB. Signed-off-by: Samar Farooqi <samafarc@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Read the oplog only when an early-start case needs it
test_changeStream_early_start.py calls _oldest_oplog_ts(collection) for every case before running the command. Only oldest_minus_5s uses the value. zero, one_zero and max_increment ignore it. On an engine with no readable local.oplog.rs, those cases fail with StopIteration before the command runs. That hides whether the engine accepts an early startAtOperationTime.
compute_start now takes a callable, so only oldest_minus_5s reads the oplog.
The amazon-documentdb profile no longer declares oplog, which it doesn't expose. oldest_minus_5s is marked requires(oplog=True). This also skips the two collMod tests that target local.oplog.rs on that profile.
Testing: the static cases read the oplog 0 times and oldest_minus_5s reads it once. On amazon-documentdb, oldest_minus_5s is skipped by precondition. Collect-only passes and the framework unit tests pass (48). Not run against a live server.