From b28f71da0c42e08bde47c9c1cfddfcd5e2291f69 Mon Sep 17 00:00:00 2001
From: Stanislav Bohm <stanislav.bohm@vsb.cz>
Date: Fri, 27 Jan 2017 14:47:06 +0100
Subject: [PATCH] FIX: Reconnect test fixed

---
 tests/client/loomenv.py     | 4 +++-
 tests/client/test_client.py | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/client/loomenv.py b/tests/client/loomenv.py
index 7ba81e3..d82e71f 100644
--- a/tests/client/loomenv.py
+++ b/tests/client/loomenv.py
@@ -135,11 +135,13 @@ class LoomEnv(Env):
             self.check_stats()
         return self._client
 
-    def submit(self, results, report=None):
+    def submit(self, results, report=None, check_timeout=None):
         if report:
             report = os.path.join(LOOM_TEST_BUILD_DIR, report)
         result = self.client.submit(results, report)
         self.check_stats()
+        if check_timeout:
+            time.sleep(check_timeout)
         self.check_final_state()
         return result
 
diff --git a/tests/client/test_client.py b/tests/client/test_client.py
index b6fdea0..7fe03bb 100644
--- a/tests/client/test_client.py
+++ b/tests/client/test_client.py
@@ -57,7 +57,7 @@ print(client.submit((a, b, c, d)))
     b = tasks.const("xyz")
     c = tasks.const("123")
     d = tasks.merge((a, b, c))
-    result = loom_env.submit(d)
+    result = loom_env.submit(d, check_timeout=0.9)
     assert result == b"abcxyz123"
 
 
-- 
GitLab