Fixing a failure seen in MessageIdFactoryTest.java
#2323
+19
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In
MessageIdFactoryTest.java
, the following test has been found to be flaky:com.dianping.cat.message.context.MessageIdFactoryTest.testGivenDomainInParallel
.REASON FOR FLAKINESS:
com.dianping.cat.message.context.MessageIdFactoryTest.testDefaultDomainInParallel
and a similar behaviour is observed in this test as well.DETECTING THE FLAKINESS:
I used the NonDex tool to verify the flakiness in both the mentioned tests. The steps that can be used to verify the same are as follows:
git clone https://github.com/dianping/cat
.mvn -pl cat-client install
.mvn -pl cat-client edu.illinois:nondex-maven-plugin:2.1.1:nondex -Dtest=com.dianping.cat.message.context.MessageIdFactoryTest#testGivenDomainInParallel
.After executing these steps, the following error will be hit:
PROPOSED SOLUTION:
pool.awaitTermination(1, TimeUnit.HOURS);
.