This commit is contained in:
benbierens 2023-06-08 13:23:26 +02:00
parent b4f144a7fb
commit 519069f97f
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
3 changed files with 6 additions and 9 deletions

View File

@ -169,8 +169,9 @@ namespace DistTestCore
public string Describe()
{
if (!string.IsNullOrEmpty(Label)) return Label;
return $"'{Filename}' ({Formatter.FormatByteSize(GetFileSize())})";
var sizePostfix = $" ({Formatter.FormatByteSize(GetFileSize())})";
if (!string.IsNullOrEmpty(Label)) return Label + sizePostfix;
return $"'{Filename}'{sizePostfix}";
}
private void AssertEqual(TestFile? actual)
@ -178,10 +179,7 @@ namespace DistTestCore
if (actual == null) Assert.Fail("TestFile is null.");
if (actual == this || actual!.Filename == Filename) Assert.Fail("TestFile is compared to itself.");
Stopwatch.Measure(log, "sizes", () =>
{
Assert.That(actual.GetFileSize(), Is.EqualTo(GetFileSize()), "Files are not of equal length.");
});
Assert.That(actual.GetFileSize(), Is.EqualTo(GetFileSize()), "Files are not of equal length.");
using var streamExpected = new FileStream(Filename, FileMode.Open, FileAccess.Read);
using var streamActual = new FileStream(actual.Filename, FileMode.Open, FileAccess.Read);

View File

@ -1,5 +1,4 @@
using DistTestCore.Codex;
using Logging;
namespace DistTestCore.Marketplace
{

View File

@ -31,7 +31,7 @@ namespace DistTestCore
public TimeSpan HttpCallRetryDelay()
{
return TimeSpan.FromSeconds(3);
return TimeSpan.FromSeconds(1);
}
public TimeSpan WaitForK8sServiceDelay()
@ -64,7 +64,7 @@ namespace DistTestCore
public TimeSpan HttpCallRetryDelay()
{
return TimeSpan.FromMinutes(5);
return TimeSpan.FromSeconds(2);
}
public TimeSpan WaitForK8sServiceDelay()