File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
google-cloud-logging/src/test/java/com/google/cloud/logging Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -396,8 +396,13 @@ public void testWriteAndListLogEntries() throws InterruptedException {
396396 assertNull (entry .getHttpRequest ());
397397 assertNotNull (entry .getInsertId ());
398398 assertNotNull (entry .getTimestamp ());
399- page = logging ().listLogEntries (EntryListOption .filter (filter ),
400- EntryListOption .sortOrder (SortingField .TIMESTAMP , SortingOrder .DESCENDING ));
399+ options = new EntryListOption []{EntryListOption .filter (filter ),
400+ EntryListOption .sortOrder (SortingField .TIMESTAMP , SortingOrder .DESCENDING )};
401+ page = logging ().listLogEntries (options );
402+ while (Iterators .size (page .iterateAll ()) < 2 ) {
403+ Thread .sleep (500 );
404+ page = logging ().listLogEntries (options );
405+ }
401406 iterator = page .iterateAll ();
402407 Long lastTimestamp = iterator .next ().getTimestamp ();
403408 while (iterator .hasNext ()) {
You can’t perform that action at this time.
0 commit comments