Merged
Show file tree
Hide file tree
Changes from 1 commit
Show all changes
59 commits
Select commit Hold shift + click to select a range
e5e8df8
feat: add async api
olavloiteFeb 20, 2020
c7db649
feat: session pool is non-blocking
olavloiteFeb 23, 2020
e485709
tests: fix integration tests that assumed tx was blocking
olavloiteFeb 24, 2020
e3ebeb3
feat: add read methods support
olavloiteFeb 25, 2020
54629ad
tests: test async runner
olavloiteFeb 25, 2020
8a10b64
feat: create async runner
olavloiteFeb 25, 2020
91253cf
tests: centralize some commonly used test objects
olavloiteFeb 26, 2020
a2d28cd
feat: keep session checked out until async finishes
olavloiteFeb 26, 2020
2a63e62
fix: fix span test cases after rebase
olavloiteFeb 26, 2020
9d58bc3
fix: fix async runner tests
olavloiteFeb 27, 2020
4f79632
fix: make async runner wait for async operations
olavloiteFeb 28, 2020
cfd1802
examples: add example integration test
olavloiteFeb 28, 2020
a2e28a5
examples: add more examples
olavloiteFeb 28, 2020
fa61e7d
tests: fix flaky tests
olavloiteFeb 28, 2020
fc53dbf
rebase: rebase on current master
olavloiteMar 16, 2020
0eee1f6
fix: run code formatter
olavloiteMar 20, 2020
d3d2ffc
feat: add support for poller
olavloiteMar 23, 2020
2e01ca7
tests: support more param types
olavloiteApr 2, 2020
5e63f2b
fix: fix race conditions
olavloiteApr 8, 2020
abe455e
feat: return ApiFuture to monitor end of AsyncResultSet
olavloiteApr 9, 2020
cc091e8
feat: add helper method for create test result sets
olavloiteApr 19, 2020
944c701
merge: merge latest changes from master
olavloiteApr 21, 2020
d75f979
feat: add batchUpdateAsync
olavloiteApr 21, 2020
7f06e84
fix: add ignored interface differences
olavloiteApr 26, 2020
c1b0615
merge: merge master into async branch
olavloiteApr 26, 2020
00b83d2
refactor: use future as waiter in SessionPool
olavloiteApr 26, 2020
2ea27d7
Merge branch 'master' into async-api
olavloiteApr 27, 2020
17fb940
merge: merge with latest from master
olavloiteApr 29, 2020
51b5113
format: run code formatter
olavloiteApr 29, 2020
a03380b
tests: fix test case + remove commented code
olavloiteApr 29, 2020
8bc3a13
fix: AsyncResultSet should throw Cancelled
olavloiteApr 29, 2020
0927957
Merge branch 'master' into async-api
olavloiteMay 6, 2020
e486c54
feat: expose DatabaseId.of(String name)
olavloiteMay 11, 2020
a7dd1dd
deps: set version to 1.53 to match bom
olavloiteMay 12, 2020
c662ed7
feat: steps to add async support for tx manager
olavloiteJun 9, 2020
226f91b
review: process review comments
olavloiteJun 11, 2020
a10b61c
fix: run formatter
olavloiteJun 11, 2020
64b8a34
chore: remove unused code
olavloiteJun 11, 2020
3354344
clirr: add ignored differences to clirr
olavloiteJun 11, 2020
2b2a6a4
Merge branch 'master' into async-api
olavloiteJun 12, 2020
1fada1c
fix: call listeners after all rows have been consumed
olavloiteJun 12, 2020
35743e6
feat: towards AsyncTransactionManager
olavloiteJun 12, 2020
48de42e
Merge branch 'master' into async-api
olavloiteJun 13, 2020
888edd8
fix: session s + code format
olavloiteJun 13, 2020
b2a7176
fix: more session fixes
olavloiteJun 13, 2020
fba270f
feat: further work on AsyncTransactionManager
olavloiteJun 14, 2020
8a0ad3f
fix: fix test failures
olavloiteJun 15, 2020
8022457
fix: fix several race conditions
olavloiteJun 15, 2020
5e84d34
tests: increase test timeout
olavloiteJun 15, 2020
707382b
Merge branch 'master' into async-api
olavloiteJun 21, 2020
fcf37fd
feat: further towards AsyncTransactionManager
olavloiteJun 21, 2020
910b6c7
feat: require executor for transaction functions
olavloiteJun 21, 2020
86f85c0
revert: remove async connection api from branch
olavloiteJun 21, 2020
f5af48f
chore: run code formatter
olavloiteJun 21, 2020
b38d164
chore: fix flaky test case
olavloiteJun 21, 2020
fda9f01
Merge branch 'master' into async-api
olavloiteJun 30, 2020
eee881a
tests: fix ITs for emulator
olavloiteJun 30, 2020
a1ef640
fix: SpannerOptions.toBuilder().host should override emulatorHost
olavloiteJun 30, 2020
ea45612
tests: fix potentially hanging test
olavloiteJun 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
PrevPrevious commit
Next Next commit
tests: fix ITs for emulator
  • Loading branch information
@olavloite
olavloite committedJun 30, 2020
commit eee881a80e106cd878bd61b1f96419a989937e0a
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,7 @@

import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;

import com.google.api.core.ApiFuture;
import com.google.cloud.spanner.AsyncResultSet;
Expand DownExpand Up@@ -278,6 +279,9 @@ public void columnNotFound() throws Exception {

@Test
public void asyncRunnerFireAndForgetInvalidUpdate() throws Exception {
assumeFalse(
"errors in read/write transactions on emulator are sticky",
env.getTestHelper().isEmulator());
try {
assertThat(client.singleUse().readRow("TestTable", Key.of("k999"), ALL_COLUMNS)).isNull();
AsyncRunner runner = client.runAsync();
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,17 +33,20 @@
import com.google.cloud.spanner.ErrorCode;
import com.google.cloud.spanner.IntegrationTestEnv;
import com.google.cloud.spanner.Key;
import com.google.cloud.spanner.KeySet;
import com.google.cloud.spanner.Mutation;
import com.google.cloud.spanner.SpannerException;
import com.google.cloud.spanner.Struct;
import com.google.cloud.spanner.TransactionContext;
import com.google.cloud.spanner.TransactionManager.TransactionState;
import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.MoreExecutors;
import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
Expand DownExpand Up@@ -84,6 +87,11 @@ public static void setUpDatabase() {
client = env.getTestHelper().getDatabaseClient(db);
}

@Before
public void clearTable() {
client.write(ImmutableList.of(Mutation.delete("T", KeySet.all())));
}

@Test
public void testSimpleInsert() throws ExecutionException, InterruptedException {
try (AsyncTransactionManager manager = client.transactionManagerAsync()) {
Expand Down