From 9ed851d1da2d04ed681fd29c665651b4eb82f45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 7 Apr 2021 17:50:32 +0200 Subject: Fix backing_queue tests that use index functions directly --- deps/rabbit/test/backing_queue_SUITE.erl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deps/rabbit/test/backing_queue_SUITE.erl b/deps/rabbit/test/backing_queue_SUITE.erl index 5bf939e11a..175eb51080 100644 --- a/deps/rabbit/test/backing_queue_SUITE.erl +++ b/deps/rabbit/test/backing_queue_SUITE.erl @@ -527,6 +527,9 @@ bq_queue_index(Config) -> ?MODULE, bq_queue_index1, [Config]). bq_queue_index1(_Config) -> + %% We must set the segment entry count in the process dictionary + %% for this test to work. + put(segment_entry_count, 1024), SegmentSize = rabbit_queue_index:next_segment_boundary(0), TwoSegs = SegmentSize + SegmentSize, MostOfASegment = trunc(SegmentSize*0.75), @@ -708,6 +711,9 @@ bq_queue_recover(Config) -> ?MODULE, bq_queue_recover1, [Config]). bq_queue_recover1(Config) -> + %% We must set the segment entry count in the process dictionary + %% for this test to work. + put(segment_entry_count, 1024), Count = 2 * rabbit_queue_index:next_segment_boundary(0), QName0 = queue_name(Config, <<"bq_queue_recover-q">>), {new, Q} = rabbit_amqqueue:declare(QName0, true, false, [], none, <<"acting-user">>), -- cgit v1.2.1