Skip to content

Commit

Permalink
RavenDB-22986 - adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grisha-kotler committed Oct 9, 2024
1 parent 4e66b6e commit 1cc5150
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions test/SlowTests/Voron/StreamBitArrayTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using FastTests;
using System;
using FastTests;
using SlowTests.Utils;
using Xunit;
using Xunit.Abstractions;
using Voron.Impl.FreeSpace;
using Tests.Infrastructure;
using Random = System.Random;

namespace SlowTests.Voron
{
Expand All @@ -13,10 +14,11 @@ public StreamBitArrayTests(ITestOutputHelper output) : base(output)
{
}

[RavenFact(RavenTestCategory.Voron)]
public void VerifyResultWithRandomInput()
[RavenTheory(RavenTestCategory.Voron)]
[InlineDataWithRandomSeed]
public void VerifyResultWithRandomInput(int seed)
{
var random = new Random();
var random = new Random(seed);
var sba = new StreamBitArray();

for (int j = 0; j < 2048; j += 1)
Expand All @@ -33,13 +35,14 @@ public void VerifyResultWithRandomInput()
}

[RavenTheory(RavenTestCategory.Voron)]
[InlineData(1, 2)]
[InlineData(2, 32)]
[InlineData(32, 300)]
[InlineData(500, 600)]
public void VerifyResultWithRandomMinMaxInput(int minContinuous, int maxContinuous)
[InlineDataWithRandomSeed(1, 2)]
[InlineDataWithRandomSeed(2, 32)]
[InlineDataWithRandomSeed(32, 300)]
[InlineDataWithRandomSeed(32, 2048)]
[InlineDataWithRandomSeed(1, 2048)]
public void VerifyResultWithRandomMinMaxInput(int minContinuous, int maxContinuous, int seed)
{
var random = new Random();
var random = new Random(seed);
var sba = new StreamBitArray();

int i = 0;
Expand All @@ -63,7 +66,7 @@ public void VerifyResultWithRandomMinMaxInput(int minContinuous, int maxContinuo
}
}

public static int? GetContinuousRangeSlow(StreamBitArray current, int num)
private static int? GetContinuousRangeSlow(StreamBitArray current, int num)
{
var start = -1;
var count = 0;
Expand Down

0 comments on commit 1cc5150

Please sign in to comment.