Skip to content

Commit

Permalink
Fix flakey list log entries test
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Oct 24, 2016
1 parent c6ec140 commit 3115bb7
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 3115bb7

Please sign in to comment.