]> source.dussan.org Git - aspectj.git/commit
Improve flaky test in Ajc1612Tests further
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Sun, 8 Aug 2021 05:07:36 +0000 (12:07 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Sun, 8 Aug 2021 05:07:36 +0000 (12:07 +0700)
commitdd712993651f9f314aa6cb9a58fbcce90a175868
treeff6b129170f3da9defcb4391b10f49e29831dfef
parente634db03482c8620f2ce39484501bb23e0a74471
Improve flaky test in Ajc1612Tests further

By using System.nanoTime() instead of currentTimeMillis(), the flakiness
even with the original 10,000 rounds is significantly lower than before.
Making my IDE repeat the test until failure, it took on average 150 runs
to make it fail. So, the more accurate timing helps. With 100,000
rounds, it was even more stable, but eventually I could make it fail.
With 1,000,000 rounds however, even running the test 500x could not make
it fail. So for all practical purposes, I think the test is reasonably
stable now.

Closes #83.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
tests/bugs1612/pr356612/AnnoBinding.java