From 7630459a7caf0df43af292a8a500bb3e298070bf Mon Sep 17 00:00:00 2001 From: tsharp Date: Mon, 12 Aug 2024 14:22:44 +0200 Subject: [PATCH] improved unittests --- MemoizR.Tests/ReactiveTests.cs | 7 ++++--- MemoizR.Tests/StructuredConcurrencyTests.cs | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MemoizR.Tests/ReactiveTests.cs b/MemoizR.Tests/ReactiveTests.cs index 1b7ac54..6b8de16 100644 --- a/MemoizR.Tests/ReactiveTests.cs +++ b/MemoizR.Tests/ReactiveTests.cs @@ -64,7 +64,7 @@ public async Task TestAsyncEnumerable() Assert.NotNull(m1); } - [Fact] + [Fact(Timeout = 2000)] public async Task TestAsyncEnumerableWithBackpressure() { var f = new MemoFactory(); @@ -261,7 +261,8 @@ public async Task TestThreadSafety2() Assert.True(invocationCount > 1, "Must be invoked more than once"); } - [Fact(Timeout = 2000)] + [Fact(Timeout = 5000)] + [Trait("Category", "Unit")] public async Task TestThreadSafety3() { var f = new MemoFactory(); @@ -301,7 +302,7 @@ public async Task TestThreadSafety3() Assert.Equal(82, result2); } - [Fact(Timeout = 2000)] + [Fact(Timeout = 5000)] public async Task TestThreadSafety4() { var f = new MemoFactory(); diff --git a/MemoizR.Tests/StructuredConcurrencyTests.cs b/MemoizR.Tests/StructuredConcurrencyTests.cs index 808c3e1..f567f0f 100644 --- a/MemoizR.Tests/StructuredConcurrencyTests.cs +++ b/MemoizR.Tests/StructuredConcurrencyTests.cs @@ -83,7 +83,6 @@ public async Task TestRaceHandling() } [Fact] - [Trait("Category", "Unit")] public async Task TestMultipleMapHandling() { var f = new MemoFactory();