From 54dea61f40d8d5814dfa4be7690beb5bb9904c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 4 Apr 2016 14:43:21 +0200 Subject: [PATCH] Test `rpc_client`: Add assertions to rpc_correlation_server/2 There are transient failures on Jenkins and Travis. Hopefully, it will help debug them. --- deps/amqp_client/test/system_SUITE.erl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/deps/amqp_client/test/system_SUITE.erl b/deps/amqp_client/test/system_SUITE.erl index 723f2c28fd..6c20e34768 100644 --- a/deps/amqp_client/test/system_SUITE.erl +++ b/deps/amqp_client/test/system_SUITE.erl @@ -799,13 +799,18 @@ rpc_client(Config) -> %% Consumer of RPC requests that replies with the CorrelationId. rpc_correlation_server(Channel, Q) -> - amqp_channel:register_return_handler(Channel, self()), - amqp_channel:call(Channel, #'queue.declare'{queue = Q}), - amqp_channel:call(Channel, #'basic.consume'{queue = Q, - consumer_tag = <<"server">>}), - rpc_client_consume_loop(Channel), - amqp_channel:call(Channel, #'basic.cancel'{consumer_tag = <<"server">>}), - amqp_channel:unregister_return_handler(Channel). + ok = amqp_channel:register_return_handler(Channel, self()), + #'queue.declare_ok'{queue = Q} = + amqp_channel:call(Channel, #'queue.declare'{queue = Q}), + #'basic.consume_ok'{} = + amqp_channel:call(Channel, + #'basic.consume'{queue = Q, + consumer_tag = <<"server">>}), + ok = rpc_client_consume_loop(Channel), + #'basic.cancel_ok'{} = + amqp_channel:call(Channel, + #'basic.cancel'{consumer_tag = <<"server">>}), + ok = amqp_channel:unregister_return_handler(Channel). rpc_client_consume_loop(Channel) -> receive