Skip to content

Commit

Permalink
Fix flakey list log entries test (#1335)
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard authored Oct 25, 2016
1 parent 54ac5fe commit 82b2951
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,13 @@ public void testWriteAndListLogEntries() throws InterruptedException {
assertNull(entry.getHttpRequest());
assertNotNull(entry.getInsertId());
assertNotNull(entry.getTimestamp());
page = logging().listLogEntries(EntryListOption.filter(filter),
EntryListOption.sortOrder(SortingField.TIMESTAMP, SortingOrder.DESCENDING));
options = new EntryListOption[]{EntryListOption.filter(filter),
EntryListOption.sortOrder(SortingField.TIMESTAMP, SortingOrder.DESCENDING)};
page = logging().listLogEntries(options);
while (Iterators.size(page.iterateAll()) < 2) {
Thread.sleep(500);
page = logging().listLogEntries(options);
}
iterator = page.iterateAll();
Long lastTimestamp = iterator.next().getTimestamp();
while (iterator.hasNext()) {
Expand Down

0 comments on commit 82b2951

Please sign in to comment.