Skip to content

STOMP: queue type tests - add queue.type assertions #13850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/rabbitmq_stomp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ define PROJECT_APP_EXTRA_KEYS
endef

DEPS = ranch rabbit_common rabbit amqp_client
TEST_DEPS = rabbitmq_ct_helpers rabbitmq_ct_client_helpers
TEST_DEPS = rabbitmq_ct_helpers rabbitmq_ct_client_helpers rabbitmq_management

PLT_APPS += rabbitmq_cli elixir

Expand Down
4 changes: 2 additions & 2 deletions deps/rabbitmq_stomp/test/python_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ groups() ->
].

init_per_suite(Config) ->
DataDir = ?config(data_dir, Config),
{ok, _} = rabbit_ct_helpers:exec(["pip", "install", "-r", requirements_path(Config),
"--target", deps_path(Config)]),
Config.

end_per_suite(Config) ->
DataDir = ?config(data_dir, Config),
ok = file:del_dir_r(deps_path(Config)),
Config.

Expand Down Expand Up @@ -82,8 +80,10 @@ run(Config, Test) ->
StompPort = rabbit_ct_broker_helpers:get_node_config(Config, 0, tcp_port_stomp),
StompPortTls = rabbit_ct_broker_helpers:get_node_config(Config, 0, tcp_port_stomp_tls),
AmqpPort = rabbit_ct_broker_helpers:get_node_config(Config, 0, tcp_port_amqp),
MgmtPort = rabbit_ct_broker_helpers:get_node_config(Config, 0, tcp_port_mgmt),
NodeName = rabbit_ct_broker_helpers:get_node_config(Config, 0, nodename),
os:putenv("AMQP_PORT", integer_to_list(AmqpPort)),
os:putenv("MGMT_PORT", integer_to_list(MgmtPort)),
os:putenv("STOMP_PORT", integer_to_list(StompPort)),
os:putenv("STOMP_PORT_TLS", integer_to_list(StompPortTls)),
os:putenv("RABBITMQ_NODENAME", atom_to_list(NodeName)),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
stomp.py==8.1.0
pika==1.1.0

rabbitman===0.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import time
import os
import re

import rabbitman

class TestUserGeneratedQueueName(base.BaseTest):

Expand All @@ -34,6 +34,11 @@ def test_quorum_queue(self):
# let the quorum queue some time to start
time.sleep(5)

client = rabbitman.Client(f'http://localhost:{(os.environ["MGMT_PORT"])}', 'guest', 'guest')
queue = client.get_queues_by_vhost_and_name("/", queueName)

self.assertEqual(queue['type'], 'quorum')

connection = pika.BlockingConnection(
pika.ConnectionParameters(host='127.0.0.1', port=int(os.environ["AMQP_PORT"])))
channel = connection.channel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import time
import os
import re
import urllib.request, json
import rabbitman

class TestUserGeneratedQueueName(base.BaseTest):

Expand All @@ -34,12 +34,17 @@ def test_stream_queue(self):
'id': 1234,
'prefetch-count': 10
},
ack="client"
ack="client"
)

# let the stream queue some time to start
time.sleep(5)

client = rabbitman.Client(f'http://localhost:{(os.environ["MGMT_PORT"])}', 'guest', 'guest')
queue = client.get_queues_by_vhost_and_name("/", queueName)

self.assertEqual(queue['type'], 'stream')

connection = pika.BlockingConnection(
pika.ConnectionParameters(host='127.0.0.1', port=int(os.environ["AMQP_PORT"])))
channel = connection.channel()
Expand Down