Skip to content

Commit

Permalink
Fixed Queue test (EnMasseProject#4766)
Browse files Browse the repository at this point in the history
Per address-settings for global-max-size has limited the maxSizeBytes per queue.  Used a medium plan (instead of small), to send the 500 messages without exceeding the resource-limit.

Signed-off-by: Vanessa Busch <[email protected]>
  • Loading branch information
vbusch authored Jun 18, 2020
1 parent bdd7f64 commit c0e299f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public interface DestinationPlan {
String BROKERED_TOPIC = "brokered-topic";
String STANDARD_SMALL_QUEUE = "standard-small-queue";
String STANDARD_SMALL_TOPIC = "standard-small-topic";
String STANDARD_MEDIUM_QUEUE = "standard-medium-queue";
String STANDARD_LARGE_QUEUE = "standard-large-queue";
String STANDARD_LARGE_TOPIC = "standard-large-topic";
String STANDARD_XLARGE_QUEUE = "standard-xlarge-queue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,19 +368,19 @@ void testScaleup() throws Exception {
.withPlan(DestinationPlan.STANDARD_LARGE_QUEUE)
.endSpec()
.build();
Address small = new AddressBuilder()
Address medium = new AddressBuilder()
.withNewMetadata()
.withNamespace(getSharedAddressSpace().getMetadata().getNamespace())
.withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), "scalequeue"))
.endMetadata()
.withNewSpec()
.withType("queue")
.withAddress("scalequeue")
.withPlan(DestinationPlan.STANDARD_SMALL_QUEUE)
.withPlan(DestinationPlan.STANDARD_MEDIUM_QUEUE)
.endSpec()
.build();

testScale(small, large, true);
testScale(medium, large, true);
testScale(large, xlarge, false);
}

Expand All @@ -395,7 +395,7 @@ private void testScale(Address before, Address after, boolean createInitial) thr

AmqpClient client = getAmqpClientFactory().createQueueClient();
final List<String> prefixes = Arrays.asList("foo", "bar", "baz", "quux");
final int numMessages = 500;
final int numMessages = 450;
final int totalNumMessages = numMessages * prefixes.size();
final int numReceiveBeforeDraining = numMessages / 2;
final int numReceivedAfterScaled = totalNumMessages - numReceiveBeforeDraining;
Expand Down

0 comments on commit c0e299f

Please sign in to comment.