Skip to content

Commit 66047f2

Browse files
author
Loïc Hoguin
committed
Fix backing_queue tests that use index functions directly
1 parent c4a53f1 commit 66047f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

deps/rabbit/test/backing_queue_SUITE.erl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,9 @@ bq_queue_index(Config) ->
527527
?MODULE, bq_queue_index1, [Config]).
528528

529529
bq_queue_index1(_Config) ->
530+
%% We must set the segment entry count in the process dictionary
531+
%% for this test to work.
532+
put(segment_entry_count, 1024),
530533
SegmentSize = rabbit_queue_index:next_segment_boundary(0),
531534
TwoSegs = SegmentSize + SegmentSize,
532535
MostOfASegment = trunc(SegmentSize*0.75),
@@ -708,6 +711,9 @@ bq_queue_recover(Config) ->
708711
?MODULE, bq_queue_recover1, [Config]).
709712

710713
bq_queue_recover1(Config) ->
714+
%% We must set the segment entry count in the process dictionary
715+
%% for this test to work.
716+
put(segment_entry_count, 1024),
711717
Count = 2 * rabbit_queue_index:next_segment_boundary(0),
712718
QName0 = queue_name(Config, <<"bq_queue_recover-q">>),
713719
{new, Q} = rabbit_amqqueue:declare(QName0, true, false, [], none, <<"acting-user">>),

0 commit comments

Comments
 (0)