You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/11/29 16:31:44 UTC

[GitHub] [qpid-proton] jiridanek commented on a change in pull request #345: PROTON-2471 Run raw connection examples during proton-c examples test

jiridanek commented on a change in pull request #345:
URL: https://github.com/apache/qpid-proton/pull/345#discussion_r758534117



##########
File path: c/examples/testme
##########
@@ -107,5 +112,41 @@ class ExampleTest(unittest.TestCase):
             else:
                 raise
 
+    def test_raw_connect(self):
+        message = b"At thee! Have at thee!\n"
+
+        with Server(["raw_echo", "", "0"], kill_me=True) as server:
+            client = subprocess.Popen(args=["raw_connect", "", server.port],
+                                      stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+            client.stdin.write(message)
+            client.stdin.flush()
+            stdout, _ = client.communicate()
+
+            expected_brief = b'**raw connection connected\n' + message + b'**raw connection disconnected\n'
+            expected_polite = b'**raw connection connected\n' + message + b'** Goodbye ****raw connection disconnected\n'
+
+            expected = expected_polite if b'Goodbye' in stdout else expected_brief

Review comment:
       I'm at a loss how to get deterministic output from the example. Sometimes it manages to receive and print that Goodbye, but oftentimes not.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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