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
Ensure that resumeToken is included on resume attempts #634
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -370,8 +370,10 @@ public void testGetResumeTokenReturnsPostBatchResumeTokenAfterGetMore() | |
// use reflection to access the postBatchResumeToken | ||
AggregateResponseBatchCursor<?> batchCursor = getBatchCursor(cursor); | ||
|
||
// check equality in the case where the batch has not been iterated at all | ||
assertEquals(cursor.getResumeToken(), batchCursor.getPostBatchResumeToken()); | ||
assertNotNull(batchCursor.getPostBatchResumeToken()); | ||
|
||
// resume token should be null before iteration | ||
assertNull(cursor.getResumeToken()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test was wrong. Before the bug fix, both the values were null. Afterwards, the postBatchResumeToken is set on the batch cursor but not the high-level cursor. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should you add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
cursor.next(); | ||
assertEquals(cursor.getResumeToken(), batchCursor.getPostBatchResumeToken()); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,6 @@ | |
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import static org.junit.Assume.assumeTrue; | ||
import static util.JsonPoweredTestHelper.getTestDocument; | ||
import static util.JsonPoweredTestHelper.getTestFiles; | ||
|
||
|
@@ -51,8 +50,6 @@ public UnifiedTestValidator(final String fileDescription, final String testDescr | |
|
||
@Before | ||
public void setUp() { | ||
// TODO: remove after https://jira.mongodb.org/browse/JAVA-3871 is fixed | ||
assumeTrue(!(fileDescription.equals("poc-change-streams") && testDescription.equals("Test consecutive resume"))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hurrah! |
||
super.setUp(); | ||
} | ||
|
||
|
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.
Now it matches AsyncQueryBatchCursor constructor