File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner/it Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,9 @@ public void databaseDeletedTest() throws Exception {
150150 }
151151 }
152152 }
153- assertThat (notFoundException ).isNotNull ();
153+ if (!isUsingEmulator ()) {
154+ assertThat (notFoundException ).isNotNull ();
155+ }
154156
155157 // Now get a new DatabaseClient for the database. This should now result in a valid
156158 // DatabaseClient.
Original file line number Diff line number Diff line change 1616
1717package com .google .cloud .spanner .it ;
1818
19+ import static com .google .cloud .spanner .testing .EmulatorSpannerHelper .isUsingEmulator ;
1920import static org .junit .Assert .assertEquals ;
2021import static org .junit .Assert .assertThrows ;
2122
2930import com .google .cloud .spanner .SpannerException ;
3031import com .google .cloud .spanner .Statement ;
3132import com .google .cloud .spanner .Value ;
33+ import com .google .cloud .spanner .testing .EmulatorSpannerHelper ;
3234import com .google .cloud .spanner .testing .RemoteSpannerHelper ;
3335import com .google .common .io .Resources ;
3436import java .io .File ;
@@ -135,7 +137,7 @@ public void testWriteAndReadInvalidJsonValues() throws IOException {
135137 if (env .getTestHelper ()
136138 .getOptions ()
137139 .getSessionPoolOptions ()
138- .getUseMultiplexedSessionForRW ()) {
140+ .getUseMultiplexedSessionForRW () && ! isUsingEmulator () ) {
139141 assertEquals (ErrorCode .INVALID_ARGUMENT , exception .getErrorCode ());
140142 } else {
141143 assertEquals (ErrorCode .FAILED_PRECONDITION , exception .getErrorCode ());
Original file line number Diff line number Diff line change @@ -1084,7 +1084,7 @@ public void incorrectType() {
10841084 if (env .getTestHelper ()
10851085 .getOptions ()
10861086 .getSessionPoolOptions ()
1087- .getUseMultiplexedSessionForRW ()) {
1087+ .getUseMultiplexedSessionForRW () && ! isUsingEmulator () ) {
10881088 assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .INVALID_ARGUMENT );
10891089 } else {
10901090 assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .FAILED_PRECONDITION );
You can’t perform that action at this time.
0 commit comments