minecraft: speedup test

This commit is contained in:
Simon Gardling 2025-10-26 21:49:00 -04:00
parent 376ea182cb
commit a910a30c01
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -88,12 +88,11 @@ testPkgs.testers.runNixOSTest {
# Wait for minecraft service to be available # Wait for minecraft service to be available
machine.wait_for_unit("minecraft-server-main.service") machine.wait_for_unit("minecraft-server-main.service")
machine.sleep(60) # Wait up to 60 seconds for the server to complete startup
with machine.nested("Waiting for minecraft server startup completion"):
# Check that the service is active and not failed machine.wait_until_succeeds(
machine.succeed("systemctl is-active minecraft-server-main.service") "grep -Eq '\\[[0-9]+:[0-9]+:[0-9]+\\] \\[Server thread/INFO\\]: Done \\([0-9]+\\.[0-9]+s\\)! For help, type \"help\"' /var/lib/minecraft/main/logs/latest.log",
timeout=60
# Check for the Minecraft server startup completion message )
machine.succeed("grep -Eq '\\[[0-9]+:[0-9]+:[0-9]+\\] \\[Server thread/INFO\\]: Done \\([0-9]+\\.[0-9]+s\\)! For help, type \"help\"' /var/lib/minecraft/main/logs/latest.log")
''; '';
} }