Skip to content

Commit

Permalink
Updating System Test
Browse files Browse the repository at this point in the history
  • Loading branch information
biswassri committed Aug 22, 2022
1 parent ba6ad8c commit 12cd251
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void testConsumeRecordsByStartingOffset(int startingOffset, int expectedResults)
})
void testConsumeLatestRecords(int limit) {
final String topicName = UUID.randomUUID().toString();
final int totalRecords = 20;
final int totalRecords = 100;
topicUtils.createTopics(List.of(topicName), 10, Status.CREATED); // single partition
List<String> messageValues = new ArrayList<>();

Expand All @@ -253,7 +253,6 @@ void testConsumeLatestRecords(int limit) {

given()
.log().ifValidationFails()
.queryParam("partition", 0)
.queryParam("limit", limit)
.when()
.get(RecordUtils.RECORDS_PATH, topicName)
Expand All @@ -262,7 +261,7 @@ void testConsumeLatestRecords(int limit) {
.statusCode(Status.OK.getStatusCode())
.body("total", equalTo(resultCount))
.body("items", hasSize(resultCount))
.body("items.findAll { it }.value", contains(messageValues.subList(totalRecords - resultCount, totalRecords).toArray(String[]::new)));
.body("items.findAll { it }.value", contains(messageValues.subList(0, resultCount).toArray(String[]::new)));
}

@Test
Expand Down

0 comments on commit 12cd251

Please sign in to comment.