diff options
author | Vasil Velichkov <vvvelichkov@gmail.com> | 2020-01-24 00:12:28 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-23 17:44:46 -0800 |
commit | 0485663ee8f4de2a498d52725bb9b7cbb869c0ee (patch) | |
tree | 2b9780af38f0294e0f46f2826199020a83a54bda /gr-digital/python/digital/qa_header_payload_demux.py | |
parent | 076d264d2443efbdf2a1f058da701309af9dc304 (diff) |
qa: Fix the stop condition in qa_header_payload_demux
Tests nees to run until both payload_sink and header_sink recive the
specified amount of data or the time limit is reached and should not
stop when only one of the sinks has received enough data.
This should fix the sporadic tests failures.
Diffstat (limited to 'gr-digital/python/digital/qa_header_payload_demux.py')
-rw-r--r-- | gr-digital/python/digital/qa_header_payload_demux.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-digital/python/digital/qa_header_payload_demux.py b/gr-digital/python/digital/qa_header_payload_demux.py index be1178c4ac..7b50b066c6 100644 --- a/gr-digital/python/digital/qa_header_payload_demux.py +++ b/gr-digital/python/digital/qa_header_payload_demux.py @@ -103,8 +103,8 @@ class qa_header_payload_demux (gr_unittest.TestCase): """Execute self.tb""" stop_time = time.time() + timeout self.tb.start() - while len(payload_sink.data()) < payload_len and \ - len(header_sink.data()) < header_len and \ + while (len(payload_sink.data()) < payload_len or \ + len(header_sink.data()) < header_len) and \ time.time() < stop_time: time.sleep(.2) self.tb.stop() |