Skip to content

Commit

Permalink
test: optimize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mherwig committed Nov 28, 2024
1 parent 778c637 commit 712e5e1
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ void testGetEventMessageContext(boolean isOffsetMode) {

var pageableCaptor = ArgumentCaptor.forClass(Pageable.class);

var messagesCount = 100;
var messagesCount = 15;
// We create a list of some test state documents similar as we would get from MongoDB
var states = MockHelper.createMessageStateMongoDocumentsForTesting(messagesCount, MockHelper.TEST_ENVIRONMENT, Status.PROCESSED, false);

var offsetIndex = 0;

// We create a new SubscriptionEventMessage for testing
var subscriptionEventMessage = MockHelper.createSubscriptionEventMessageForTesting(DeliveryType.CALLBACK);

Expand All @@ -77,6 +75,7 @@ void testGetEventMessageContext(boolean isOffsetMode) {
fail(e);
}

var offsetIndex = 0;
// We mock the request to MongoDB and return our dummy state documents instead
// We also capture the pageable argument to check whether it has been used correctly, later
if (isOffsetMode) {
Expand Down

0 comments on commit 712e5e1

Please sign in to comment.