Skip to content

Commit

Permalink
fix: reverts array size due to framework memory alloc
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Aug 14, 2024
1 parent e313ef4 commit b5f3635
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/abstractions/Store/InMemoryBackingStoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public void TestsBackingStoreNestedInvocationCounts()

Assert.Equal(2, invocationCount);// only called twice
}
private readonly int[] _testArray = Enumerable.Range(0, 1000000000).ToArray();
private readonly int[] _testArray = Enumerable.Range(0, 100000000).ToArray();
[Fact]
public void TestsLargeArrayPerformsWell()
{
Expand All @@ -478,12 +478,12 @@ public void TestsLargeArrayPerformsWell()
var stopWatch = Stopwatch.StartNew();
testBackingStore.Set("email", _testArray);
stopWatch.Stop();
Assert.InRange(stopWatch.ElapsedMilliseconds, 0, 2);
Assert.InRange(stopWatch.ElapsedMilliseconds, 0, 1);
stopWatch.Restart();
testBackingStore.InitializationCompleted = true;
stopWatch.Stop();
// Assert
Assert.InRange(stopWatch.ElapsedMilliseconds, 0, 2);
Assert.InRange(stopWatch.ElapsedMilliseconds, 0, 1);
}

/// <summary>
Expand Down

0 comments on commit b5f3635

Please sign in to comment.