Bug: TestDrainReplicationQueuesForStandBy is flakey
Status: Open | Priority: Major | Resolution: 
Created: 07/Jan/22 00:39
Affects Version/s: 3.0.0-alpha-3

{{TestDrainReplicationQueuesForStandBy}} is behaving badly for me, it keeps coming up as a failure in PRs. It's been passing on master nightlies. When I checkout a recent master, {{ce2bbaf30a}}, and run the test in a loop, I see it failing with this error at a rate of about 2 in 10 tries.

{noformat}
[INFO] Running org.apache.hadoop.hbase.replication.regionserver.TestDrainReplicationQueuesForStandBy
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 35.264 s <<< FAILURE! - in org.apache.hadoop.hbase.replication.regionserver.TestDrainReplicationQueuesForStandBy                 
[ERROR] org.apache.hadoop.hbase.replication.regionserver.TestDrainReplicationQueuesForStandBy.test  Time elapsed: 15.628 s  <<< ERROR!
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0               
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)                                                                                                                  
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)                                                                                                        
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)             
        at java.base/java.util.Objects.checkIndex(Objects.java:372)                                                                                                                                      
        at java.base/java.util.ArrayList.get(ArrayList.java:459)                                                                                                                                         
        at org.apache.hadoop.hbase.replication.regionserver.TestDrainReplicationQueuesForStandBy.test(TestDrainReplicationQueuesForStandBy.java:77)                                                      
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.apache.hadoop.hbase.SystemExitRule$1.evaluate(SystemExitRule.java:38)
        at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
        at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:829)
{noformat}