Skip to content

Commit 7a30039

Browse files
Merge pull request #8463 from rabbitmq/ik-bump-stomppy-2566
Bump stomp.py to v8.1.0.
2 parents 7c1b23e + ee64032 commit 7a30039

File tree

7 files changed

+34
-75
lines changed

7 files changed

+34
-75
lines changed

deps/rabbitmq_stomp/test/python_SUITE.erl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ init_per_group(_, Config) ->
4040
Config2 = rabbit_ct_helpers:run_setup_steps(
4141
Config1,
4242
rabbit_ct_broker_helpers:setup_steps()),
43-
DataDir = ?config(data_dir, Config2),
44-
PikaDir = filename:join([DataDir, "deps", "pika"]),
45-
StomppyDir = filename:join([DataDir, "deps", "stomppy"]),
46-
rabbit_ct_helpers:make(Config2, PikaDir, []),
47-
rabbit_ct_helpers:make(Config2, StomppyDir, []),
4843
Config2.
4944

5045
end_per_group(_, Config) ->
@@ -75,13 +70,6 @@ run(Config, Test) ->
7570
StompPortTls = rabbit_ct_broker_helpers:get_node_config(Config, 0, tcp_port_stomp_tls),
7671
AmqpPort = rabbit_ct_broker_helpers:get_node_config(Config, 0, tcp_port_amqp),
7772
NodeName = rabbit_ct_broker_helpers:get_node_config(Config, 0, nodename),
78-
PikaPath = filename:join([DataDir, "deps", "pika","pika"]),
79-
StomppyPath = filename:join([DataDir, "deps", "stomppy", "stomppy"]),
80-
PythonPath = case os:getenv("PYTHONPATH") of
81-
false -> PikaPath ++ ":" ++ StomppyPath;
82-
P -> PikaPath ++ ":" ++ StomppyPath ++ ":" ++ P
83-
end,
84-
os:putenv("PYTHONPATH", PythonPath),
8573
os:putenv("AMQP_PORT", integer_to_list(AmqpPort)),
8674
os:putenv("STOMP_PORT", integer_to_list(StompPort)),
8775
os:putenv("STOMP_PORT_TLS", integer_to_list(StompPortTls)),

deps/rabbitmq_stomp/test/python_SUITE_data/deps/pika/Makefile

Lines changed: 0 additions & 27 deletions
This file was deleted.

deps/rabbitmq_stomp/test/python_SUITE_data/deps/stomppy/Makefile

Lines changed: 0 additions & 27 deletions
This file was deleted.

deps/rabbitmq_stomp/test/python_SUITE_data/src/main_runner.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/usr/bin/env python3
22

3+
import sys
4+
import subprocess
5+
6+
# implement pip as a subprocess:
7+
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
8+
'stomp.py==8.1.0'])
9+
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
10+
'pika==1.1.0'])
11+
312
import test_runner
413

514
if __name__ == '__main__':

deps/rabbitmq_stomp/test/python_SUITE_data/src/test_runner.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
## Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved.
88
##
99

10+
import sys
11+
import subprocess
12+
13+
# implement pip as a subprocess:
14+
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
15+
'stomp.py==8.1.0'])
16+
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
17+
'pika==1.1.0'])
18+
1019
import unittest
1120
import sys
1221
import os

deps/rabbitmq_stomp/test/python_SUITE_data/src/tls_connect_disconnect.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,17 @@
2323
class TestTLSConnection(unittest.TestCase):
2424

2525
def __ssl_connect(self):
26-
conn = stomp.Connection(host_and_ports = [ ('localhost', int(os.environ["STOMP_PORT_TLS"])) ],
27-
use_ssl = True, ssl_key_file = ssl_key_file,
28-
ssl_cert_file = ssl_cert_file,
29-
ssl_ca_certs = ssl_ca_certs)
26+
conn = stomp.Connection(host_and_ports = [ ('localhost', int(os.environ["STOMP_PORT_TLS"])) ])
27+
conn.set_ssl([ ('localhost', int(os.environ["STOMP_PORT_TLS"])) ], key_file = ssl_key_file,
28+
cert_file = ssl_cert_file, ca_certs = ssl_ca_certs)
3029
print("FILE: ".format(ssl_cert_file))
3130
conn.connect("guest", "guest")
3231
return conn
3332

3433
def __ssl_auth_connect(self):
35-
conn = stomp.Connection(host_and_ports = [ ('localhost', int(os.environ["STOMP_PORT_TLS"])) ],
36-
use_ssl = True, ssl_key_file = ssl_key_file,
37-
ssl_cert_file = ssl_cert_file,
38-
ssl_ca_certs = ssl_ca_certs)
34+
conn = stomp.Connection(host_and_ports = [ ('localhost', int(os.environ["STOMP_PORT_TLS"])) ])
35+
conn.set_ssl([ ('localhost', int(os.environ["STOMP_PORT_TLS"])) ], key_file = ssl_key_file,
36+
cert_file = ssl_cert_file, ca_certs = ssl_ca_certs)
3937
conn.connect()
4038
return conn
4139

@@ -83,4 +81,4 @@ def __test_conn(self, conn):
8381
modules = [
8482
__name__
8583
]
86-
test_runner.run_unittests(modules)
84+
test_runner.run_unittests(modules)

deps/rabbitmq_stomp/test/python_SUITE_data/src/tls_runner.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
## Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved.
88
##
99

10+
import sys
11+
import subprocess
12+
13+
# implement pip as a subprocess:
14+
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
15+
'stomp.py==8.1.0'])
16+
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
17+
'pika==1.1.0'])
18+
1019
import test_runner
1120
import test_util
1221

0 commit comments

Comments
 (0)