commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 44/46: zeromq: updates to qa code to wait f


From: git
Subject: [Commit-gnuradio] [gnuradio] 44/46: zeromq: updates to qa code to wait for completion and pass.
Date: Fri, 16 May 2014 19:37:17 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit f4a0034532eefbeeaa6fd0d05f305463f106e50b
Author: Tom Rondeau <address@hidden>
Date:   Fri May 16 14:02:06 2014 -0400

    zeromq: updates to qa code to wait for completion and pass.
---
 gr-zeromq/python/zeromq/qa_zeromq_pub.py      | 3 ++-
 gr-zeromq/python/zeromq/qa_zeromq_pushpull.py | 8 ++++++--
 gr-zeromq/python/zeromq/qa_zeromq_reqrep.py   | 8 ++++++--
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pub.py 
b/gr-zeromq/python/zeromq/qa_zeromq_pub.py
index 8a4d491..6f08aa5 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_pub.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pub.py
@@ -43,7 +43,8 @@ class qa_zeromq_pub (gr_unittest.TestCase):
         self.probe_manager = zeromq.probe_manager()
         self.probe_manager.add_socket("tcp://127.0.0.1:5555", 'float32', 
self.recv_data)
         self.tb.run()
-        self.assertEqual(self.rx_data, src_data)
+        self.probe_manager.watcher()
+        self.assertFloatTuplesAlmostEqual(self.rx_data, src_data)
 
     def recv_data (self, data):
         self.rx_data = data
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py 
b/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
index 56f0cb6..0b732c9 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
@@ -21,6 +21,7 @@
 #
 
 from gnuradio import gr, gr_unittest, blocks, zeromq
+import time
 
 class qa_zeromq_pushpull (gr_unittest.TestCase):
 
@@ -39,8 +40,11 @@ class qa_zeromq_pushpull (gr_unittest.TestCase):
         sink = blocks.vector_sink_f(vlen)
         self.tb.connect(src, zeromq_push_sink)
         self.tb.connect(zeromq_pull_source, sink)
-        self.tb.run ()
-        self.assertEqual(sink.data(), src_data)
+        self.tb.start()
+        time.sleep(0.25)
+        self.tb.stop()
+        self.tb.wait()
+        self.assertFloatTuplesAlmostEqual(sink.data(), src_data)
 
 if __name__ == '__main__':
     gr_unittest.run(qa_zeromq_pushpull)
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py 
b/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
index 337f285..3329add 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
@@ -24,6 +24,7 @@
 from gnuradio import gr, gr_unittest
 from gnuradio import blocks, zeromq
 from gnuradio import eng_notation
+import time
 
 class qa_zeromq_reqrep (gr_unittest.TestCase):
 
@@ -42,8 +43,11 @@ class qa_zeromq_reqrep (gr_unittest.TestCase):
         sink = blocks.vector_sink_f(vlen)
         self.tb.connect(src, zeromq_rep_sink)
         self.tb.connect(zeromq_req_source, sink)
-        self.tb.run ()
-        self.assertEqual(sink.data(), src_data)
+        self.tb.start()
+        time.sleep(0.25)
+        self.tb.stop()
+        self.tb.wait()
+        self.assertFloatTuplesAlmostEqual(sink.data(), src_data)
 
 if __name__ == '__main__':
     gr_unittest.run(qa_zeromq_reqrep)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]