ARTEMIS-856 Fixing ScaleDownTest

Don't increment the pos if redistributor. causes pos to be > size thus index out of bounds when getting the consumer on next loop.
This commit is contained in:
Michael André Pearce 2018-08-03 08:52:47 +01:00
parent 77989c3763
commit 825081cfc0
1 changed files with 2 additions and 2 deletions

View File

@ -2516,7 +2516,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
// Only move onto the next position if the consumer on the current position was used.
// When using group we don't need to load balance to the next position
if (!exclusive && groupConsumer == null) {
if (redistributor == null && !exclusive && groupConsumer == null) {
pos++;
}
@ -3029,7 +3029,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
}
// Only move onto the next position if the consumer on the current position was used.
if (!exclusive && groupConsumer == null) {
if (redistributor == null && !exclusive && groupConsumer == null) {
pos++;
}