running data tests
This commit is contained in:
parent
cfb6297357
commit
7c4ad416d4
|
@ -8,6 +8,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -8,13 +8,13 @@ namespace CodexReleaseTests.DataTests
|
|||
public class ManifestOnlyDownloadTest : CodexDistTest
|
||||
{
|
||||
[Test]
|
||||
public void StreamlessTest()
|
||||
public void ManifestOnlyTest()
|
||||
{
|
||||
var uploader = StartCodex();
|
||||
var downloader = StartCodex(s => s.WithBootstrapNode(uploader));
|
||||
|
||||
var file = GenerateTestFile(2.GB());
|
||||
var size = Convert.ToInt64(file.GetFilesize());
|
||||
var size = file.GetFilesize().SizeInBytes;
|
||||
var cid = uploader.UploadFile(file);
|
||||
|
||||
var startSpace = downloader.Space();
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace CodexReleaseTests.DataTests
|
|||
var downloader = StartCodex(s => s.WithBootstrapNode(uploader));
|
||||
|
||||
var file = GenerateTestFile(10.MB());
|
||||
var size = Convert.ToInt64(file.GetFilesize());
|
||||
var size = file.GetFilesize().SizeInBytes;
|
||||
var cid = uploader.UploadFile(file);
|
||||
|
||||
var startSpace = downloader.Space();
|
||||
|
@ -34,7 +34,8 @@ namespace CodexReleaseTests.DataTests
|
|||
retry.Run(() =>
|
||||
{
|
||||
var space = downloader.Space();
|
||||
Assert.That(space.FreeBytes, Is.LessThanOrEqualTo(startSpace.FreeBytes - size));
|
||||
var expected = startSpace.FreeBytes - size;
|
||||
if (space.FreeBytes > expected) throw new Exception("Expected free space not reached.");
|
||||
});
|
||||
|
||||
// Stop the uploader node and verify that the downloader has the data.
|
||||
|
|
|
@ -14,8 +14,8 @@ namespace CodexReleaseTests.DataTests
|
|||
[TestFixture]
|
||||
public class SwarmTests : AutoBootstrapDistTest
|
||||
{
|
||||
private const int NumberOfNodes = 10;
|
||||
private const int FileSizeMb = 100;
|
||||
private const int NumberOfNodes = 5;
|
||||
private const int FileSizeMb = 2;
|
||||
|
||||
[Test]
|
||||
public void SmallSwarm()
|
||||
|
|
|
@ -28,10 +28,8 @@ namespace CodexReleaseTests.DataTests
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!ex.Message.StartsWith("Retry 'DownloadFile' timed out"))
|
||||
{
|
||||
throw;
|
||||
}
|
||||
var expectedMessage = $"Download of '{unknownCid.Id}' timed out";
|
||||
if (!ex.Message.StartsWith(expectedMessage)) throw;
|
||||
}
|
||||
|
||||
WaitAndCheckNodesStaysAlive(TimeSpan.FromMinutes(2), node);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
[assembly: LevelOfParallelism(1)]
|
||||
namespace CodexReleaseTests.DataTests
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue