Fix WriteLargeJsonToStreamWithoutFlushing test (#34489)
authorLayomi Akinrinade <laakinri@microsoft.com>
Fri, 3 Apr 2020 13:27:27 +0000 (09:27 -0400)
committerGitHub <noreply@github.com>
Fri, 3 Apr 2020 13:27:27 +0000 (09:27 -0400)
src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs

index af7a511..b01a19d 100644 (file)
@@ -752,7 +752,7 @@ namespace System.Text.Json.Tests
                 Assert.Equal(1_050_097_521, writer.BytesPending);
 
                 // Next write forces a grow beyond 2 GB
-                Assert.Throws<OverflowException>(() => writer.WriteStringValue(text3));
+                Assert.Throws<OutOfMemoryException>(() => writer.WriteStringValue(text3));
 
                 Assert.Equal(1_050_097_521, writer.BytesPending);