mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-08 16:33:07 +00:00
Applies long timesets for cluster runs
This commit is contained in:
parent
536d297365
commit
c1fa309271
@ -27,7 +27,7 @@ namespace KubernetesWorkflow.Types
|
||||
public Address GetAddress(string portTag)
|
||||
{
|
||||
var addresses = Addresses.Where(a => a.PortTag == portTag).ToArray();
|
||||
if (!addresses.Any()) throw new Exception("No addresses found for portTag: " + portTag);
|
||||
if (addresses.Length == 0) throw new Exception("No addresses found for portTag: " + portTag);
|
||||
|
||||
var select = SelectAddress(addresses);
|
||||
return select.Address;
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
using System.Security.Cryptography;
|
||||
using CodexReleaseTests.Utils;
|
||||
using Nethereum.JsonRpc.Client;
|
||||
using CodexReleaseTests.Utils;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
|
||||
|
||||
@ -179,16 +179,34 @@ namespace DistTestCore
|
||||
|
||||
private IWebCallTimeSet GetWebCallTimeSet()
|
||||
{
|
||||
if (IsRunningInCluster())
|
||||
{
|
||||
Log(" > Detected we're running in the cluster. Using long webCall timeset.");
|
||||
return new LongWebCallTimeSet();
|
||||
}
|
||||
|
||||
if (ShouldUseLongTimeouts()) return new LongWebCallTimeSet();
|
||||
return new DefaultWebCallTimeSet();
|
||||
}
|
||||
|
||||
private IK8sTimeSet GetK8sTimeSet()
|
||||
{
|
||||
if (IsRunningInCluster())
|
||||
{
|
||||
Log(" > Detected we're running in the cluster. Using long kubernetes timeset.");
|
||||
return new LongK8sTimeSet();
|
||||
}
|
||||
|
||||
if (ShouldUseLongTimeouts()) return new LongK8sTimeSet();
|
||||
return new DefaultK8sTimeSet();
|
||||
}
|
||||
|
||||
private bool IsRunningInCluster()
|
||||
{
|
||||
var testType = Environment.GetEnvironmentVariable("TEST_TYPE");
|
||||
return testType == "release-tests";
|
||||
}
|
||||
|
||||
private bool ShouldWaitForCleanup()
|
||||
{
|
||||
return CurrentTestMethodHasAttribute<WaitForCleanupAttribute>();
|
||||
@ -256,7 +274,7 @@ namespace DistTestCore
|
||||
|
||||
private string GetCurrentTestName()
|
||||
{
|
||||
return $"[{TestContext.CurrentContext.Test.Name}]";
|
||||
return $"[{NameUtils.GetTestMethodName()}]";
|
||||
}
|
||||
|
||||
public DistTestResult GetTestResult()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user