Apache9 commented on a change in pull request #4118: URL: https://github.com/apache/hbase/pull/4118#discussion_r810574060
########## File path: hbase-asyncfs/src/test/java/org/apache/hadoop/hbase/io/asyncfs/TestFanOutOneBlockAsyncDFSOutput.java ########## @@ -72,14 +72,11 @@ HBaseClassTestRule.forClass(TestFanOutOneBlockAsyncDFSOutput.class); private static final Logger LOG = LoggerFactory.getLogger(TestFanOutOneBlockAsyncDFSOutput.class); - private static DistributedFileSystem FS; - private static EventLoopGroup EVENT_LOOP_GROUP; - private static Class<? extends Channel> CHANNEL_CLASS; - private static int READ_TIMEOUT_MS = 2000; + private static final Random RNG = new Random(); Review comment: setSeed could make the Random always give the same sequence, which could make the test more determined. So maybe for now let's just follow these rules: 1. By default, we will replace Random with ThreadLocalRandom. 2. If there is a setSeed call, then a. If the seed is just System.currentTimeMillis, then just replace it with ThreadLocalRandom. b. Otherwise, keep the old behavior, call setSeed on the Random object. WDYT? Thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org