aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-08-05 15:16:17 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-08-05 15:16:17 +0700
commite634db03482c8620f2ce39484501bb23e0a74471 (patch)
tree2be6fdfd074185639c5b7470ddf86a2d760181f4 /tests
parentcec3fc86cb886165d049ff242d7abdf7c8608e61 (diff)
downloadaspectj-e634db03482c8620f2ce39484501bb23e0a74471.tar.gz
aspectj-e634db03482c8620f2ce39484501bb23e0a74471.zip
Stabilise flaky test in Ajc1612Tests
By increasing from 10,000 to 1,000,000 rounds, the times compared for performance become considerably longer (but still in the tens or hundreds or milliseconds), decreasing the probability of the test failing due to CPU load or some other random effect. Closes #83. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs1612/pr356612/AnnoBinding.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/bugs1612/pr356612/AnnoBinding.java b/tests/bugs1612/pr356612/AnnoBinding.java
index 7bee9c52f..fd47c6785 100644
--- a/tests/bugs1612/pr356612/AnnoBinding.java
+++ b/tests/bugs1612/pr356612/AnnoBinding.java
@@ -11,13 +11,15 @@ import org.aspectj.lang.reflect.FieldSignature;
public class AnnoBinding {
public static void main(String[] argv) {
long stime = System.currentTimeMillis();
- for (int i = 0; i < 10000; i++) {
+ // 10,000 or 100,000 rounds are too quick, making the test flaky
+ final int ROUNDS = 1000 * 1000;
+ for (int i = 0; i < ROUNDS; i++) {
runOne();
}
long etime = System.currentTimeMillis();
long manual = (etime - stime);
stime = System.currentTimeMillis();
- for (int i = 0; i < 10000; i++) {
+ for (int i = 0; i < ROUNDS; i++) {
runTwo();
}
etime = System.currentTimeMillis();