diff --git a/DistTestCore/ByteSize.cs b/DistTestCore/ByteSize.cs index 8d47cf25..bbf01cc3 100644 --- a/DistTestCore/ByteSize.cs +++ b/DistTestCore/ByteSize.cs @@ -38,6 +38,11 @@ namespace DistTestCore { private const long Kilo = 1024; + public static ByteSize Bytes(this long i) + { + return new ByteSize(i); + } + public static ByteSize KB(this long i) { return new ByteSize(i * Kilo); @@ -58,6 +63,11 @@ namespace DistTestCore return (i * Kilo).GB(); } + public static ByteSize Bytes(this int i) + { + return new ByteSize(i); + } + public static ByteSize KB(this int i) { return Convert.ToInt64(i).KB(); diff --git a/Tests/BasicTests/ContinuousSubstitute.cs b/Tests/BasicTests/ContinuousSubstitute.cs index 324b3d78..ff606efa 100644 --- a/Tests/BasicTests/ContinuousSubstitute.cs +++ b/Tests/BasicTests/ContinuousSubstitute.cs @@ -61,17 +61,21 @@ namespace Tests.BasicTests } } + private ByteSize fileSize = 10.MB(); + private void PerformTest(IOnlineCodexNode primary, IOnlineCodexNode secondary) { ScopedTestFiles(() => { - var testFile = GenerateTestFile(1000.MB()); + var testFile = GenerateTestFile(fileSize); var contentId = primary.UploadFile(testFile); var downloadedFile = secondary.DownloadContent(contentId); testFile.AssertIsEqual(downloadedFile); + + fileSize = (fileSize.SizeInBytes * 2).Bytes(); }); } }