From e2befd9377cf6d2cc0dcd5d7d6473c7b2e75f76e Mon Sep 17 00:00:00 2001 From: Kamil Cukrowski Date: Tue, 30 Jul 2024 00:33:22 +0200 Subject: [PATCH] tests:go: harden --- tests/integration/test_go.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_go.py b/tests/integration/test_go.py index 6c757c9..95ab9b5 100644 --- a/tests/integration/test_go.py +++ b/tests/integration/test_go.py @@ -1,16 +1,20 @@ from tests.testlib import run_nomadt +# These tests fail randomly because Nomad is too slow to transfer logs. +# Proper synchronization is somewhere between "can't be done" and TODO. +sync = "echo;echo;echo;echo;echo;echo;sleep 5" + def test_go_hello_world(): run_nomadt( - "go --rm busybox:stable sh -c 'echo hello world'", + f"go --rm busybox:stable sh -c 'echo hello world;{sync}'", output=["hello world"], ) def test_go_hello_world_md5(): run_nomadt( - "go --rm busybox:stable sh -c 'echo hello world | md5sum'", + f"go --rm busybox:stable sh -c 'echo hello world | md5sum;{sync}'", output=["6f5902ac237024bdd0c176cb93063dc4"], )