diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/channel_operation_timeout_test_queue.erl | 24 | ||||
| -rw-r--r-- | test/priority_queue_SUITE.erl | 2 | ||||
| -rw-r--r-- | test/unit_inbroker_SUITE.erl | 2 |
3 files changed, 12 insertions, 16 deletions
diff --git a/test/channel_operation_timeout_test_queue.erl b/test/channel_operation_timeout_test_queue.erl index 87c33bea87..4407a24e7f 100644 --- a/test/channel_operation_timeout_test_queue.erl +++ b/test/channel_operation_timeout_test_queue.erl @@ -123,19 +123,17 @@ -rabbit_upgrade({multiple_routing_keys, local, []}). --ifdef(use_specs). +-type seq_id() :: non_neg_integer(). --type(seq_id() :: non_neg_integer()). - --type(rates() :: #rates { in :: float(), +-type rates() :: #rates { in :: float(), out :: float(), ack_in :: float(), ack_out :: float(), - timestamp :: rabbit_types:timestamp()}). + timestamp :: rabbit_types:timestamp()}. --type(delta() :: #delta { start_seq_id :: non_neg_integer(), +-type delta() :: #delta { start_seq_id :: non_neg_integer(), count :: non_neg_integer(), - end_seq_id :: non_neg_integer() }). + end_seq_id :: non_neg_integer() }. %% The compiler (rightfully) complains that ack() and state() are %% unused. For this reason we duplicate a -spec from @@ -143,8 +141,8 @@ %% warnings. The problem here is that we can't parameterise the BQ %% behaviour by these two types as we would like to. We still leave %% these here for documentation purposes. --type(ack() :: seq_id()). --type(state() :: #vqstate { +-type ack() :: seq_id(). +-type state() :: #vqstate { q1 :: ?QUEUE:?QUEUE(), q2 :: ?QUEUE:?QUEUE(), delta :: delta(), @@ -186,13 +184,11 @@ disk_write_count :: non_neg_integer(), io_batch_size :: pos_integer(), - mode :: 'default' | 'lazy' }). + mode :: 'default' | 'lazy' }. %% Duplicated from rabbit_backing_queue --spec(ack/2 :: ([ack()], state()) -> {[rabbit_guid:guid()], state()}). - --spec(multiple_routing_keys/0 :: () -> 'ok'). +-spec ack([ack()], state()) -> {[rabbit_guid:guid()], state()}. --endif. +-spec multiple_routing_keys() -> 'ok'. -define(BLANK_DELTA, #delta { start_seq_id = undefined, count = 0, diff --git a/test/priority_queue_SUITE.erl b/test/priority_queue_SUITE.erl index 39ed3af69a..79d47ab7fc 100644 --- a/test/priority_queue_SUITE.erl +++ b/test/priority_queue_SUITE.erl @@ -577,7 +577,7 @@ publish_payload(Ch, Q, PPds) -> amqp_channel:wait_for_confirms(Ch). publish_many(_Ch, _Q, 0) -> ok; -publish_many( Ch, Q, N) -> publish1(Ch, Q, random:uniform(5)), +publish_many( Ch, Q, N) -> publish1(Ch, Q, rand_compat:uniform(5)), publish_many(Ch, Q, N - 1). publish1(Ch, Q, P) -> diff --git a/test/unit_inbroker_SUITE.erl b/test/unit_inbroker_SUITE.erl index c26154ff69..60a4d2fa12 100644 --- a/test/unit_inbroker_SUITE.erl +++ b/test/unit_inbroker_SUITE.erl @@ -1316,7 +1316,7 @@ maybe_switch_queue_mode(VQ) -> random_queue_mode() -> Modes = [lazy, default], - lists:nth(random:uniform(length(Modes)), Modes). + lists:nth(rand_compat:uniform(length(Modes)), Modes). pub_res({_, VQS}) -> VQS; |
