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 <c...@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-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to