test(opcua): permit bounded investigative profiling without a full soak claim
This commit is contained in:
+2
-1
@@ -42,10 +42,11 @@ public sealed class Sdk2LifecycleSoakTests
|
|||||||
public async Task Repeated_lifecycles_return_resources_to_a_steady_baseline()
|
public async Task Repeated_lifecycles_return_resources_to_a_steady_baseline()
|
||||||
{
|
{
|
||||||
var mode = Environment.GetEnvironmentVariable("OTOPCUA_SDK2_SOAK_MODE");
|
var mode = Environment.GetEnvironmentVariable("OTOPCUA_SDK2_SOAK_MODE");
|
||||||
(mode is "diagnostic" or "full").ShouldBeTrue("explicit diagnostic or full mode is required");
|
(mode is "diagnostic" or "profile" or "full").ShouldBeTrue("explicit diagnostic, profile or full mode is required");
|
||||||
var seconds = int.Parse(Environment.GetEnvironmentVariable("OTOPCUA_SDK2_SOAK_SECONDS")
|
var seconds = int.Parse(Environment.GetEnvironmentVariable("OTOPCUA_SDK2_SOAK_SECONDS")
|
||||||
?? (mode == "full" ? "7200" : "90"), CultureInfo.InvariantCulture);
|
?? (mode == "full" ? "7200" : "90"), CultureInfo.InvariantCulture);
|
||||||
if (mode == "full") seconds.ShouldBeGreaterThanOrEqualTo(7200);
|
if (mode == "full") seconds.ShouldBeGreaterThanOrEqualTo(7200);
|
||||||
|
else if (mode == "profile") seconds.ShouldBeInRange(60, 1800); // Investigative only; never satisfies the full-duration flag.
|
||||||
else seconds.ShouldBeInRange(60, 120);
|
else seconds.ShouldBeInRange(60, 120);
|
||||||
var output = Environment.GetEnvironmentVariable("OTOPCUA_SDK2_SOAK_OUTPUT")
|
var output = Environment.GetEnvironmentVariable("OTOPCUA_SDK2_SOAK_OUTPUT")
|
||||||
?? throw new InvalidOperationException("An absolute, fresh OTOPCUA_SDK2_SOAK_OUTPUT JSONL path is required.");
|
?? throw new InvalidOperationException("An absolute, fresh OTOPCUA_SDK2_SOAK_OUTPUT JSONL path is required.");
|
||||||
|
|||||||
Reference in New Issue
Block a user