Skip to content

Commit 4c8e40f

Browse files
committed
chore: WriteTests give same error now on Prod and Emulator
1 parent 7e59635 commit 4c8e40f

File tree

1 file changed

+2
-18
lines changed
  • apis/Google.Cloud.Spanner.Data/Google.Cloud.Spanner.Data.IntegrationTests

1 file changed

+2
-18
lines changed

apis/Google.Cloud.Spanner.Data/Google.Cloud.Spanner.Data.IntegrationTests/WriteTests.cs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,7 @@ public async Task BadColumnName()
320320
cmd.Parameters.Add("badjuju", SpannerDbType.String, IdGenerator.FromGuid());
321321
var e = await Assert.ThrowsAsync<SpannerException>(() => cmd.ExecuteNonQueryAsyncWithRetry());
322322
Logger.DefaultLogger.Debug($"BadColumnName: Caught error code: {e.ErrorCode}");
323-
if (_fixture.RunningOnEmulator)
324-
{
325-
// Emulator vs Prod give different exceptions for this case with Multiplex Sessions
326-
Assert.Equal(ErrorCode.InvalidArgument, e.ErrorCode);
327-
}
328-
else
329-
{
330-
Assert.Equal(ErrorCode.NotFound, e.ErrorCode);
331-
}
323+
Assert.Equal(ErrorCode.NotFound, e.ErrorCode);
332324

333325
Assert.False(e.IsTransientSpannerFault());
334326
}
@@ -358,15 +350,7 @@ public async Task BadTableName()
358350
var e = await Assert.ThrowsAsync<SpannerException>(() => cmd.ExecuteNonQueryAsyncWithRetry());
359351
Logger.DefaultLogger.Debug($"BadTableName: Caught error code: {e.ErrorCode}");
360352

361-
if (_fixture.RunningOnEmulator)
362-
{
363-
// Emulator vs Prod give different exceptions for this case with Multiplex Sessions
364-
Assert.Equal(ErrorCode.InvalidArgument, e.ErrorCode);
365-
}
366-
else
367-
{
368-
Assert.Equal(ErrorCode.NotFound, e.ErrorCode);
369-
}
353+
Assert.Equal(ErrorCode.NotFound, e.ErrorCode);
370354

371355
Assert.False(e.IsTransientSpannerFault());
372356
}

0 commit comments

Comments
 (0)