Skip to content

Commit

Permalink
Unit test fix
Browse files Browse the repository at this point in the history
Signed-off-by: Dinu John <[email protected]>
  • Loading branch information
dinujoh committed Apr 1, 2024
1 parent 5740266 commit a1417a7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void test_processStream_checkPointIntervalSuccess() {
Document doc3 = mock(Document.class);
BsonDocument bsonDoc1 = new BsonDocument("resumeToken1", new BsonInt32(123));
BsonDocument bsonDoc2 = new BsonDocument("resumeToken2", new BsonInt32(234));
BsonDocument bsonDoc3 = new BsonDocument("resumeToken2", new BsonInt32(456));
BsonDocument bsonDoc3 = new BsonDocument("resumeToken3", new BsonInt32(456));
when(streamDoc1.getResumeToken()).thenReturn(bsonDoc1);
when(streamDoc2.getResumeToken()).thenReturn(bsonDoc2);
when(streamDoc3.getResumeToken()).thenReturn(bsonDoc3);
Expand All @@ -188,6 +188,7 @@ void test_processStream_checkPointIntervalSuccess() {
verify(successItemsCounter).increment(2);
verify(successItemsCounter).increment(1);
verify(failureItemsCounter, never()).increment();
verify(mockPartitionCheckpoint).checkpoint("{\"resumeToken2\": 456}", 3);
verify(mockPartitionCheckpoint).checkpoint("{\"resumeToken2\": 234}", 2);
verify(mockPartitionCheckpoint).checkpoint("{\"resumeToken3\": 456}", 3);
}
}

0 comments on commit a1417a7

Please sign in to comment.