Test assertion and logging to try and narrow down the cause of the Linux advanced watchdog failures

This commit is contained in:
Jordan Dominion
2024-09-08 01:25:10 -04:00
parent 4570a20a3a
commit 5696aa5263
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -15,7 +15,9 @@
var/ibf = message == "Failed initial bridge request!"
if(ibf || message == "Failed bridge request, bad json: null" || findtext(message, "byond_world_export: Failed request: ") || message == "Failed to activate API!")
if(ibf)
text2file("yes", "initial_bridge_failed.txt")
world.log << "Writing test fail file..."
text2file("BRIDGE FAILED", "initial_bridge_failed.txt")
world.log << "File exists: [fexists("initial_bridge_failed.txt")]"
del(world)
sleep(1)
@@ -698,6 +698,7 @@ namespace Tgstation.Server.Tests.Live.Instance
Assert.IsFalse(daemonStatus.SessionId.HasValue);
Assert.IsFalse(daemonStatus.LaunchTime.HasValue);
Assert.IsNull(daemonStatus.StagedCompileJob);
Assert.AreNotEqual(DreamDaemonSecurity.Ultrasafe, daemonStatus.SecurityLevel);
await ExpectGameDirectoryCount(1, cancellationToken);
@@ -1606,7 +1607,10 @@ namespace Tgstation.Server.Tests.Live.Instance
{
var bridgeFailFile = Path.Combine(gameDir, "initial_bridge_failed.txt");
var initialBridgeFailed = File.Exists(bridgeFailFile);
Assert.AreEqual(expectInitialBridgeFailure, initialBridgeFailed, "Initial bridge failure expectancy not met");
System.Console.WriteLine($"Files in game dir:{Environment.NewLine}{String.Join(Environment.NewLine, Directory.GetFiles(gameDir))}");
Assert.AreEqual(expectInitialBridgeFailure, initialBridgeFailed, $"Initial bridge failure expectancy not met in {gameDir}");
var successFile = Path.Combine(gameDir, "test_success.txt");
Assert.IsTrue(File.Exists(successFile));