Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
test: adding debug output in ITPaginationTest (#684)
Browse files Browse the repository at this point in the history
Troubleshooting for the flaky test #683.
  • Loading branch information
suztomo committed Apr 25, 2022
1 parent cfe512d commit e7db3e2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,18 @@ public void testPaginationIterating() {
ListZonesRequest.newBuilder().setProject(DEFAULT_PROJECT).setMaxResults(1).build();
ZonesClient.ListPagedResponse response = zonesClient.list(listZonesRequest);
boolean presented = false;
int count = 0;
for (Zone element : response.iterateAll()) {
count++;
if (element.getName().equals(DEFAULT_ZONE)) {
presented = true;
}
}
Assert.assertTrue(
String.format("Zone %s was not found in zones list.", DEFAULT_ZONE), presented);
String.format(
"Zone %s was not found for %s in zones list (size: %d).",
DEFAULT_ZONE, DEFAULT_PROJECT, count),
presented);
}

@Test
Expand Down

0 comments on commit e7db3e2

Please sign in to comment.