Cleanup
This commit is contained in:
parent
b4f144a7fb
commit
519069f97f
|
@ -169,8 +169,9 @@ namespace DistTestCore
|
||||||
|
|
||||||
public string Describe()
|
public string Describe()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(Label)) return Label;
|
var sizePostfix = $" ({Formatter.FormatByteSize(GetFileSize())})";
|
||||||
return $"'{Filename}' ({Formatter.FormatByteSize(GetFileSize())})";
|
if (!string.IsNullOrEmpty(Label)) return Label + sizePostfix;
|
||||||
|
return $"'{Filename}'{sizePostfix}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AssertEqual(TestFile? actual)
|
private void AssertEqual(TestFile? actual)
|
||||||
|
@ -178,10 +179,7 @@ namespace DistTestCore
|
||||||
if (actual == null) Assert.Fail("TestFile is null.");
|
if (actual == null) Assert.Fail("TestFile is null.");
|
||||||
if (actual == this || actual!.Filename == Filename) Assert.Fail("TestFile is compared to itself.");
|
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 streamExpected = new FileStream(Filename, FileMode.Open, FileAccess.Read);
|
||||||
using var streamActual = new FileStream(actual.Filename, FileMode.Open, FileAccess.Read);
|
using var streamActual = new FileStream(actual.Filename, FileMode.Open, FileAccess.Read);
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using DistTestCore.Codex;
|
using DistTestCore.Codex;
|
||||||
using Logging;
|
|
||||||
|
|
||||||
namespace DistTestCore.Marketplace
|
namespace DistTestCore.Marketplace
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace DistTestCore
|
||||||
|
|
||||||
public TimeSpan HttpCallRetryDelay()
|
public TimeSpan HttpCallRetryDelay()
|
||||||
{
|
{
|
||||||
return TimeSpan.FromSeconds(3);
|
return TimeSpan.FromSeconds(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TimeSpan WaitForK8sServiceDelay()
|
public TimeSpan WaitForK8sServiceDelay()
|
||||||
|
@ -64,7 +64,7 @@ namespace DistTestCore
|
||||||
|
|
||||||
public TimeSpan HttpCallRetryDelay()
|
public TimeSpan HttpCallRetryDelay()
|
||||||
{
|
{
|
||||||
return TimeSpan.FromMinutes(5);
|
return TimeSpan.FromSeconds(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TimeSpan WaitForK8sServiceDelay()
|
public TimeSpan WaitForK8sServiceDelay()
|
||||||
|
|
Loading…
Reference in New Issue