Skip to content

Commit 03720f0

Browse files
Fix flakky tests
1 parent 77cb585 commit 03720f0

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadAsyncTest.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,20 @@
1616

1717
package com.google.cloud.spanner;
1818

19-
import static com.google.cloud.spanner.MockSpannerTestUtil.*;
19+
import static com.google.cloud.spanner.MockSpannerTestUtil.EMPTY_KEY_VALUE_RESULTSET;
20+
import static com.google.cloud.spanner.MockSpannerTestUtil.EMPTY_READ_TABLE_NAME;
21+
import static com.google.cloud.spanner.MockSpannerTestUtil.READ_COLUMN_NAMES;
22+
import static com.google.cloud.spanner.MockSpannerTestUtil.READ_MULTIPLE_KEY_VALUE_RESULTSET;
23+
import static com.google.cloud.spanner.MockSpannerTestUtil.READ_MULTIPLE_KEY_VALUE_STATEMENT;
24+
import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_EMPTY_KEY_VALUE_STATEMENT;
25+
import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_KEY_VALUE_RESULTSET;
26+
import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_KEY_VALUE_STATEMENT;
27+
import static com.google.cloud.spanner.MockSpannerTestUtil.READ_TABLE_NAME;
28+
import static com.google.cloud.spanner.MockSpannerTestUtil.READ_TABLE_TYPE;
29+
import static com.google.cloud.spanner.MockSpannerTestUtil.TEST_DATABASE;
30+
import static com.google.cloud.spanner.MockSpannerTestUtil.TEST_INSTANCE;
31+
import static com.google.cloud.spanner.MockSpannerTestUtil.TEST_PROJECT;
32+
import static com.google.cloud.spanner.MockSpannerTestUtil.generateKeyValueResultSet;
2033
import static com.google.cloud.spanner.SpannerApiFutures.get;
2134
import static com.google.common.truth.Truth.assertThat;
2235
import static org.junit.Assert.assertThrows;
@@ -309,11 +322,14 @@ public void readOnlyTransaction() throws Exception {
309322
}
310323
try (AsyncResultSet rs = tx.executeQueryAsync(statement2)) {
311324
values2 = rs.toListAsync(input -> input.getString("Value"), executor);
325+
System.out.println(values2);
312326
}
313327
}
314328

315329
ApiFuture<List<List<String>>> allValuesAsList =
316330
ApiFutures.allAsList(Arrays.asList(values1, values2));
331+
System.out.println("Values 1 " + String.join(",", values1.get()));
332+
System.out.println("Values 2 " + String.join(",", values2.get()));
317333
ApiFuture<Iterable<String>> allValues =
318334
ApiFutures.transform(
319335
allValuesAsList,

0 commit comments

Comments
 (0)