From 85e91cf2d0b5d1982e045af23c6ab279e35521bc Mon Sep 17 00:00:00 2001
From: gpotter2 <gabriel@potter.fr>
Date: Mon, 5 Jun 2017 13:25:10 +0200
Subject: [PATCH] Reduce waiting time in tests
---
test/pipetool.uts | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/test/pipetool.uts b/test/pipetool.uts
index 5b0a7103..9e0c67c5 100644
--- a/test/pipetool.uts
+++ b/test/pipetool.uts
@@ -42,7 +42,6 @@ s > d1 > c
p = PipeEngine(s)
p.start()
-time.sleep(1)
p.wait_and_stop()
= Test add_pipe on running instance
@@ -67,6 +66,7 @@ s > d1 > c
p.add(s)
time.sleep(1)
+
p.wait_and_stop()
assert test_val == "hello"
@@ -130,7 +130,6 @@ p.list_pipes_detailed()
= Test RawConsoleSink with CLIFeeder
p = PipeEngine()
-p.start()
s = CLIFeeder()
s.send("hello")
@@ -144,14 +143,14 @@ c._write_pipe = w
s > d1 > c
p.add(s)
-time.sleep(1)
-p.wait_and_stop()
+p.start()
+
assert os.read(r, 20) == "hello\n"
+p.wait_and_stop()
= Test QueueSink with CLIFeeder
p = PipeEngine()
-p.start()
s = CLIFeeder()
s.send("hello")
@@ -162,7 +161,8 @@ c = QueueSink(name="c")
s > d1 > c
p.add(s)
-time.sleep(1)
+p.start()
+
p.wait_and_stop()
assert c.recv() == "hello"
@@ -176,7 +176,6 @@ class TestSink(Sink):
test_val = msg
p = PipeEngine()
-p.start()
s = CLIFeeder()
s.send("hello")
@@ -188,7 +187,8 @@ s > d1
d1 >> c
p.add(s)
-time.sleep(1)
+p.start()
+
p.wait_and_stop()
assert test_val == "hello"
@@ -202,7 +202,6 @@ class TestSink(Sink):
test_val = msg
p = PipeEngine()
-p.start()
s = CLIHighFeeder()
s.send("hello")
@@ -214,6 +213,7 @@ s >> d1
d1 > c
p.add(s)
-time.sleep(1)
+p.start()
+
p.wait_and_stop()
assert test_val == "hello"
--
GitLab