diff --git a/UnitTests/Tests.cs b/UnitTests/Tests.cs
index 8751a51..c5380b5 100644
--- a/UnitTests/Tests.cs
+++ b/UnitTests/Tests.cs
@@ -4057,9 +4057,8 @@ protected override void TestDroppingLargeBuffer(long maxFreeLargeBufferSize)
}
}
}
-#pragma warning disable 618 // Timeout is obsolete because it kills the thread, which isn't allowed, but it's still handy
- // for tests that are expected to run indefinitely in the failure case.
- [Test, Timeout(10000)]
+
+ [Test, MaxTime(10000)]
public void TryGetBuffer_InfiniteLoop_Issue344()
{
// see https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/issues/344
diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj
index f88171e..5c3eaa6 100644
--- a/UnitTests/UnitTests.csproj
+++ b/UnitTests/UnitTests.csproj
@@ -12,7 +12,7 @@
-
+