You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2020/12/04 21:44:17 UTC

[qpid-dispatch] branch dev-protocol-adaptors-2 updated: NO-JIRA: Tcp test client data verification success case efficiency gain

This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch dev-protocol-adaptors-2
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/dev-protocol-adaptors-2 by this push:
     new a2f111f  NO-JIRA: Tcp test client data verification success case efficiency gain
a2f111f is described below

commit a2f111f2512db94538cd8aa461e9aba651d5f889
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Fri Dec 4 16:43:59 2020 -0500

    NO-JIRA: Tcp test client data verification success case efficiency gain
---
 tests/TCP_echo_client.py | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/tests/TCP_echo_client.py b/tests/TCP_echo_client.py
index fe673b4..aa29bc9 100755
--- a/tests/TCP_echo_client.py
+++ b/tests/TCP_echo_client.py
@@ -168,15 +168,17 @@ class TcpEchoClient:
                                     # Received all bytes of all chunks - done.
                                     self.keep_running = False
                                     # Verify the received data
-                                    for idxc in range(self.count):
-                                        for idxs in range(self.size):
-                                            ob = payload_out[idxc][idxs]
-                                            ib = payload_in[idxc][idxs]
-                                            if ob != ib:
-                                                self.error = "%s ERROR Rcvd message verify fail. row:%d, col:%d, " \
-                                                             "expected:%s, actual:%s" \
-                                                             % (self.prefix, idxc, idxs, repr(ob), repr(ib))
-                                                break
+                                    if not payload_in == payload_out:
+                                        for idxc in range(self.count):
+                                            if not payload_in[idxc] == payload_out[idxc]:
+                                                for idxs in range(self.size):
+                                                    ob = payload_out[idxc][idxs]
+                                                    ib = payload_in[idxc][idxs]
+                                                    if ob != ib:
+                                                        self.error = "%s ERROR Rcvd message verify fail. row:%d, col:%d, " \
+                                                                     "expected:%s, actual:%s" \
+                                                                     % (self.prefix, idxc, idxs, repr(ob), repr(ib))
+                                                        break
                                 else:
                                     out_ready_to_send = True
                                     sel.modify(sock, selectors.EVENT_READ | selectors.EVENT_WRITE)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org