File tree Expand file tree Collapse file tree 2 files changed +3
-24
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner/it Expand file tree Collapse file tree 2 files changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -161,14 +161,7 @@ public void testInvalidInsert() throws InterruptedException {
161161 } catch (ExecutionException e ) {
162162 assertThat (e .getCause ()).isInstanceOf (SpannerException .class );
163163 SpannerException se = (SpannerException ) e .getCause ();
164- if (env .getTestHelper ()
165- .getOptions ()
166- .getSessionPoolOptions ()
167- .getUseMultiplexedSessionForRW ()) {
168- assertThat (se .getErrorCode ()).isEqualTo (ErrorCode .INVALID_ARGUMENT );
169- } else {
170- assertThat (se .getErrorCode ()).isEqualTo (ErrorCode .NOT_FOUND );
171- }
164+ assertThat (se .getErrorCode ()).isEqualTo (ErrorCode .NOT_FOUND );
172165 // expected
173166 break ;
174167 }
Original file line number Diff line number Diff line change @@ -1043,14 +1043,7 @@ public void tableNotFound() {
10431043 .build ());
10441044 fail ("Expected exception" );
10451045 } catch (SpannerException ex ) {
1046- if (env .getTestHelper ()
1047- .getOptions ()
1048- .getSessionPoolOptions ()
1049- .getUseMultiplexedSessionForRW ()) {
1050- assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .INVALID_ARGUMENT );
1051- } else {
1052- assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .NOT_FOUND );
1053- }
1046+ assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .NOT_FOUND );
10541047 }
10551048 }
10561049
@@ -1060,14 +1053,7 @@ public void columnNotFound() {
10601053 write (baseInsert ().set ("ColumnThatDoesNotExist" ).to ("V1" ).build ());
10611054 fail ("Expected exception" );
10621055 } catch (SpannerException ex ) {
1063- if (env .getTestHelper ()
1064- .getOptions ()
1065- .getSessionPoolOptions ()
1066- .getUseMultiplexedSessionForRW ()) {
1067- assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .INVALID_ARGUMENT );
1068- } else {
1069- assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .NOT_FOUND );
1070- }
1056+ assertThat (ex .getErrorCode ()).isEqualTo (ErrorCode .NOT_FOUND );
10711057 }
10721058 }
10731059
You can’t perform that action at this time.
0 commit comments