@@ -229,7 +229,7 @@ public void asyncRunnerUpdateAbortedWithoutGettingResult() throws Exception {
229229 public  void  asyncRunnerCommitFails () throws  Exception  {
230230 mockSpanner .setCommitExecutionTime (
231231 SimulatedExecutionTime .ofException (
232-  Status .RESOURCE_EXHAUSTED 
232+  Status .INVALID_ARGUMENT 
233233 .withDescription ("mutation limit exceeded" )
234234 .asRuntimeException ()));
235235 AsyncRunner  runner  = client ().runAsync ();
@@ -245,7 +245,7 @@ public void asyncRunnerCommitFails() throws Exception {
245245 ExecutionException  e  = assertThrows (ExecutionException .class , () -> updateCount .get ());
246246 assertThat (e .getCause ()).isInstanceOf (SpannerException .class );
247247 SpannerException  se  = (SpannerException ) e .getCause ();
248-  assertThat (se .getErrorCode ()).isEqualTo (ErrorCode .RESOURCE_EXHAUSTED );
248+  assertThat (se .getErrorCode ()).isEqualTo (ErrorCode .INVALID_ARGUMENT );
249249 assertThat (se .getMessage ()).contains ("mutation limit exceeded" );
250250 }
251251
@@ -432,7 +432,7 @@ public void asyncRunnerBatchUpdateAbortedWithoutGettingResult() throws Exception
432432 public  void  asyncRunnerWithBatchUpdateCommitFails () throws  Exception  {
433433 mockSpanner .setCommitExecutionTime (
434434 SimulatedExecutionTime .ofException (
435-  Status .RESOURCE_EXHAUSTED 
435+  Status .INVALID_ARGUMENT 
436436 .withDescription ("mutation limit exceeded" )
437437 .asRuntimeException ()));
438438 AsyncRunner  runner  = client ().runAsync ();
@@ -448,7 +448,7 @@ public void asyncRunnerWithBatchUpdateCommitFails() throws Exception {
448448 ExecutionException  e  = assertThrows (ExecutionException .class , () -> updateCount .get ());
449449 assertThat (e .getCause ()).isInstanceOf (SpannerException .class );
450450 SpannerException  se  = (SpannerException ) e .getCause ();
451-  assertThat (se .getErrorCode ()).isEqualTo (ErrorCode .RESOURCE_EXHAUSTED );
451+  assertThat (se .getErrorCode ()).isEqualTo (ErrorCode .INVALID_ARGUMENT );
452452 assertThat (se .getMessage ()).contains ("mutation limit exceeded" );
453453 }
454454
0 commit comments