Disables downloading logs
This commit is contained in:
parent
3683044bf7
commit
23ebd4166b
|
@ -14,7 +14,7 @@ public class ScalabilityTests : CodexDistTest
|
|||
[Test]
|
||||
[Combinatorial]
|
||||
[UseLongTimeouts]
|
||||
[DontDownloadLogsOnFailure]
|
||||
[DontDownloadLogs]
|
||||
public void ShouldMaintainFileInNetwork(
|
||||
[Values(10, 40, 80, 100)] int numberOfNodes,
|
||||
[Values(100, 1000, 5000, 10000)] int fileSizeInMb,
|
||||
|
|
|
@ -24,6 +24,9 @@ namespace DistTestCore
|
|||
this.dataFilesPath = dataFilesPath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does not override [DontDownloadLogs] attribute.
|
||||
/// </summary>
|
||||
public bool AlwaysDownloadContainerLogs { get; set; }
|
||||
|
||||
public KubernetesWorkflow.Configuration GetK8sConfiguration(ITimeSet timeSet, string k8sNamespace)
|
||||
|
|
|
@ -267,10 +267,11 @@ namespace DistTestCore
|
|||
|
||||
private bool ShouldDownloadAllLogs(TestStatus testStatus)
|
||||
{
|
||||
if (!IsDownloadingLogsEnabled()) return false;
|
||||
if (configuration.AlwaysDownloadContainerLogs) return true;
|
||||
if (testStatus == TestStatus.Failed)
|
||||
{
|
||||
return IsDownloadingLogsEnabled();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -289,7 +290,7 @@ namespace DistTestCore
|
|||
private bool IsDownloadingLogsEnabled()
|
||||
{
|
||||
var testProperties = TestContext.CurrentContext.Test.Properties;
|
||||
return !testProperties.ContainsKey(DontDownloadLogsOnFailureAttribute.DontDownloadKey);
|
||||
return !testProperties.ContainsKey(DontDownloadLogsAttribute.DontDownloadKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
namespace DistTestCore
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
|
||||
public class DontDownloadLogsOnFailureAttribute : PropertyAttribute
|
||||
public class DontDownloadLogsAttribute : PropertyAttribute
|
||||
{
|
||||
public const string DontDownloadKey = "DontDownloadLogs";
|
||||
|
||||
public DontDownloadLogsOnFailureAttribute()
|
||||
public DontDownloadLogsAttribute()
|
||||
: base(DontDownloadKey)
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue