File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner/it Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package com .google .cloud .spanner .it ;
18
18
19
- import static com .google .cloud .spanner .testing .EmulatorSpannerHelper .isUsingEmulator ;
20
19
import static org .junit .Assert .assertEquals ;
21
20
import static org .junit .Assert .assertThrows ;
22
21
@@ -133,8 +132,10 @@ public void testWriteAndReadInvalidJsonValues() throws IOException {
133
132
.to (Value .json (jsonStr ))
134
133
.build ())));
135
134
136
- if (env .getTestHelper ().getOptions ().getSessionPoolOptions ().getUseMultiplexedSessionForRW ()
137
- && !isUsingEmulator ()) {
135
+ if (env .getTestHelper ()
136
+ .getOptions ()
137
+ .getSessionPoolOptions ()
138
+ .getUseMultiplexedSessionForRW ()) {
138
139
assertEquals (ErrorCode .INVALID_ARGUMENT , exception .getErrorCode ());
139
140
} else {
140
141
assertEquals (ErrorCode .FAILED_PRECONDITION , exception .getErrorCode ());
Original file line number Diff line number Diff line change @@ -1081,8 +1081,10 @@ public void incorrectType() {
1081
1081
write (baseInsert ().set ("StringValue" ).to (1.234 ).build ());
1082
1082
fail ("Expected exception" );
1083
1083
} catch (SpannerException ex ) {
1084
- if (env .getTestHelper ().getOptions ().getSessionPoolOptions ().getUseMultiplexedSessionForRW ()
1085
- && !isUsingEmulator ()) {
1084
+ if (env .getTestHelper ()
1085
+ .getOptions ()
1086
+ .getSessionPoolOptions ()
1087
+ .getUseMultiplexedSessionForRW ()) {
1086
1088
assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .INVALID_ARGUMENT );
1087
1089
} else {
1088
1090
assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .FAILED_PRECONDITION );
You can’t perform that action at this time.
0 commit comments