rabbitmq / rabbitmq-stomp

RabbitMQ STOMP plugin
https://www.rabbitmq.com/stomp.html
Other
49 stars 28 forks source link

Migrate to common test #87

Closed hairyhum closed 8 years ago

hairyhum commented 8 years ago

Python tests are started using rabbit_ct_helpers:exec. rabbit_stomp_publish_test is not migrated and left as is, because it wasn't used in tests anyway.

michaelklishin commented 8 years ago

This expects pika and stomp.py to be installed via pip, this should be documented.

michaelklishin commented 8 years ago

There are compilation warnings:

test/src/rabbit_stomp_test_frame.erl:164: Warning: function frame_string/3 is unused
test/src/rabbit_stomp_test_util.erl:106: Warning: variable 'Delivery' is unused
michaelklishin commented 8 years ago

I have a test failure in the TLS suite on 2 machines:

=== Ended at 2016-07-22 05:29:20
=== Location: [{python_SUITE,run,47},
              {test_server,ts_tc,1533},
              {test_server,run_test_case_eval1,1053},
              {test_server,run_test_case_eval,985}]
=== Reason: no match of right hand side value {error,1,
                                                    "Stopping node 'rmq-ct-1-21030@localhost' ...\nResetting node 'rmq-ct-1-21030@localhost' ...\nStarting node 'rmq-ct-1-21030@localhost' ...\nCreating user \"O=client,CN=urano\" ...\nClearing password for user \"O=client,CN=urano\" ...\nSetting permissions for user \"O=client,CN=urano\" in vhost \"/\" ...\nNo handlers could be found for logger \"stomp.py\"\nEEEE\n======================================================================\nERROR: test_ssl_auth_connect (ssl_lifecycle.TestSslClient)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"/Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/test/src/ssl_lifecycle.py\", line 42, in test_ssl_auth_connect\n    conn = self.__ssl_auth_connect()\n  File \"/Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/test/src/ssl_lifecycle.py\", line 33, in __ssl_auth_connect\n    conn.start()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/connect.py\", line 25, in start\n    self.transport.start()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/transport.py\", line 105, in start\n    self.attempt_connection()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/transport.py\", line 737, in attempt_connection\n    raise exception.ConnectFailedException()\nConnectFailedException\n\n======================================================================\nERROR: test_ssl_auth_send_receive (ssl_lifecycle.TestSslClient)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"/Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/test/src/ssl_lifecycle.py\", line 50, in test_ssl_auth_send_receive\n    conn = self.__ssl_auth_connect()\n  File \"/Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/test/src/ssl_lifecycle.py\", line 33, in __ssl_auth_connect\n    conn.start()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/connect.py\", line 25, in start\n    self.transport.start()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/transport.py\", line 105, in start\n    self.attempt_connection()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/transport.py\", line 737, in attempt_connection\n    raise exception.ConnectFailedException()\nConnectFailedException\n\n======================================================================\nERROR: test_ssl_connect (ssl_lifecycle.TestSslClient)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"/Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/test/src/ssl_lifecycle.py\", line 38, in test_ssl_connect\n    conn = self.__ssl_connect()\n  File \"/Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/test/src/ssl_lifecycle.py\", line 24, in __ssl_connect\n    conn.start()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/connect.py\", line 25, in start\n    self.transport.start()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/transport.py\", line 105, in start\n    self.attempt_connection()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/transport.py\", line 737, in attempt_connection\n    raise exception.ConnectFailedException()\nConnectFailedException\n\n======================================================================\nERROR: test_ssl_send_receive (ssl_lifecycle.TestSslClient)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"/Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/test/src/ssl_lifecycle.py\", line 46, in test_ssl_send_receive\n    conn = self.__ssl_connect()\n  File \"/Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/test/src/ssl_lifecycle.py\", line 24, in __ssl_connect\n    conn.start()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/connect.py\", line 25, in start\n    self.transport.start()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/transport.py\", line 105, in start\n    self.attempt_connection()\n  File \"/usr/local/lib/python2.7/site-packages/stomp/transport.py\", line 737, in attempt_connection\n    raise exception.ConnectFailedException()\nConnectFailedException\n\n----------------------------------------------------------------------\nRan 4 tests in 3.292s\n\nFAILED (errors=4)\nFILE:  /Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/logs/ct_run.ct@urano.2016-07-22_05.26.09/deps.rabbitmq_stomp.python_SUITE.logs/run.2016-07-22_05.26.41/log_private/certs/client/cert.pem\nFILE:  /Users/antares/Development/RabbitMQ/stable_umbrella.git/deps/rabbitmq_stomp/logs/ct_run.ct@urano.2016-07-22_05.26.09/deps.rabbitmq_stomp.python_SUITE.logs/run.2016-07-22_05.26.41/log_private/certs/client/cert.pem\n"}
  in function  python_SUITE:run/2 (test/python_SUITE.erl, line 47)
  in call from test_server:ts_tc/3 (test_server.erl, line 1533)
  in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1053)
  in call from test_server:run_test_case_eval/9 (test_server.erl, line 985)
hairyhum commented 8 years ago

Does TLS failure occur on OTP 18.3? Python tests seems like not working there due to TLSV1_ALERT_INSUFFICIENT_SECURITY error. We can make it a separate issue.

pika and stomppy should be loaded from deps dir https://github.com/rabbitmq/rabbitmq-stomp/pull/87/files#diff-9d2fbd4da8f7469351276f0f91e19f26R41

dumbbell commented 8 years ago

Does TLS failure occur on OTP 18.3?

Almost all 18.3.x releases have a different TLS regression :( I remember a failure like the one you hit with Erlang 18.3.3 while doing QA on the ObjectiveC client.

dumbbell commented 8 years ago

About the build failures in Travis, I committed a fixed configuration to both stable and master. You can rebase your branch to get it.