I'm running HDFS test on
HDFS-3077 branch. I found TestJournalNode#testJournal fails sometimes. The assertion failed is:
MetricsAsserts.assertCounter("BatchesWritten", 0L, metrics);
The reason is when testHttpServer is running before testJournal, it will write some logs to JN. The fix is simple: assign a new JID for each test case, so that they will use different metrics.