Description
You will see it fails if you run it 10 times in a loop. Below is the error stack trace:
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at org.apache.phoenix.end2end.StatsManagerTest.testStatsManager(StatsManagerTest.java:136)
The root cause is that the constructor MinKeyChange & MaxKeyChange internally trigger the states update
MinKeyChange minKeyChange = new MinKeyChange(stats, table); MaxKeyChange maxKeyChange = new MaxKeyChange(stats, table);
So the latter
stats.getMinKey(table);
gets a different value unexpectedly.