mirror of
https://github.com/codex-storage/cs-codex-dist-tests.git
synced 2025-02-02 23:33:45 +00:00
Cleanup
This commit is contained in:
parent
917d715497
commit
ccc4732752
@ -1,5 +1,4 @@
|
|||||||
using KubernetesWorkflow;
|
using KubernetesWorkflow;
|
||||||
using Utils;
|
|
||||||
|
|
||||||
namespace Core
|
namespace Core
|
||||||
{
|
{
|
||||||
|
@ -74,8 +74,6 @@ namespace ContinuousTests
|
|||||||
return GetType().Name;
|
return GetType().Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IPluginTools Tools { get; internal set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum TestFailMode
|
public enum TestFailMode
|
||||||
|
@ -6,7 +6,6 @@ using System.Reflection;
|
|||||||
using CodexPlugin;
|
using CodexPlugin;
|
||||||
using DistTestCore.Logs;
|
using DistTestCore.Logs;
|
||||||
using Core;
|
using Core;
|
||||||
using System.ComponentModel;
|
|
||||||
|
|
||||||
namespace ContinuousTests
|
namespace ContinuousTests
|
||||||
{
|
{
|
||||||
@ -63,7 +62,6 @@ namespace ContinuousTests
|
|||||||
|
|
||||||
private void RunTest(Action<bool> resultHandler)
|
private void RunTest(Action<bool> resultHandler)
|
||||||
{
|
{
|
||||||
var ci = entryPoint.CreateInterface();
|
|
||||||
var testStart = DateTime.UtcNow;
|
var testStart = DateTime.UtcNow;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -105,14 +103,13 @@ namespace ContinuousTests
|
|||||||
// The test failed just now. We can't expect the logs to be available in elastic-search immediately:
|
// The test failed just now. We can't expect the logs to be available in elastic-search immediately:
|
||||||
Thread.Sleep(TimeSpan.FromMinutes(1));
|
Thread.Sleep(TimeSpan.FromMinutes(1));
|
||||||
|
|
||||||
var effectiveStart = testStart.Subtract(TimeSpan.FromSeconds(10));
|
var effectiveStart = testStart.Subtract(TimeSpan.FromSeconds(30));
|
||||||
var effectiveEnd = DateTime.UtcNow.AddSeconds(30);
|
var effectiveEnd = DateTime.UtcNow;
|
||||||
var elasticSearchLogDownloader = new ElasticSearchLogDownloader(entryPoint.Tools, fixtureLog);
|
var elasticSearchLogDownloader = new ElasticSearchLogDownloader(entryPoint.Tools, fixtureLog);
|
||||||
|
|
||||||
foreach (var node in nodes)
|
foreach (var node in nodes)
|
||||||
{
|
{
|
||||||
var container = node.Container;
|
elasticSearchLogDownloader.Download(fixtureLog.CreateSubfile(), node.Container, effectiveStart, effectiveEnd);
|
||||||
elasticSearchLogDownloader.Download(fixtureLog.CreateSubfile(), container, effectiveStart, effectiveEnd);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +207,6 @@ namespace ContinuousTests
|
|||||||
{
|
{
|
||||||
Log($" > Running TestMoment '{name}'");
|
Log($" > Running TestMoment '{name}'");
|
||||||
handle.Test.Initialize(nodes, fixtureLog, entryPoint.Tools.GetFileManager(), config, cancelToken);
|
handle.Test.Initialize(nodes, fixtureLog, entryPoint.Tools.GetFileManager(), config, cancelToken);
|
||||||
handle.Test.Tools = entryPoint.Tools;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DecommissionTest()
|
private void DecommissionTest()
|
||||||
|
@ -26,10 +26,6 @@ namespace ContinuousTests.Tests
|
|||||||
|
|
||||||
var dl = Nodes[0].DownloadContent(cid);
|
var dl = Nodes[0].DownloadContent(cid);
|
||||||
file.AssertIsEqual(dl);
|
file.AssertIsEqual(dl);
|
||||||
|
|
||||||
var targetFile = Log.CreateSubfile();
|
|
||||||
var downloader = new ElasticSearchLogDownloader(Tools, Log);
|
|
||||||
downloader.Download(targetFile, Nodes[0].Container, DateTime.UtcNow.Subtract(TimeSpan.FromMinutes(1)), DateTime.UtcNow.AddMinutes(1));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user