Skip to content

Commit f64e4cd

Browse files
author
edelgadoh
committed
Adding labels to split StopWatch feature - increase marging
1 parent 2561d57 commit f64e4cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/apache/commons/lang3/time/StopWatchTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ void testSplitsWithStringLabels() {
531531
assertEquals(splits.get(2).getLabel(), thirdLabel);
532532

533533
// check duration
534-
final int margin = 20;
534+
final int margin = 100;
535535
assertTrue(splits.get(0).getDuration() >= 400 && splits.get(0).getDuration() < 400 + margin);
536536
assertTrue(splits.get(1).getDuration() >= 200 && splits.get(1).getDuration() < 200 + margin);
537537
assertTrue(splits.get(2).getDuration() >= 100 && splits.get(2).getDuration() < 100 + margin);
@@ -578,7 +578,7 @@ void testSplitsWithIntLabels() {
578578
assertEquals(splits.get(2).getLabel(), String.valueOf(thirdLabel));
579579

580580
// check duration
581-
final int margin = 20;
581+
final int margin = 100;
582582
assertTrue(splits.get(0).getDuration() >= 400 && splits.get(0).getDuration() < 400 + margin);
583583
assertTrue(splits.get(1).getDuration() >= 200 && splits.get(1).getDuration() < 200 + margin);
584584
assertTrue(splits.get(2).getDuration() >= 100 && splits.get(2).getDuration() < 100 + margin);
@@ -611,7 +611,7 @@ void testNanoSplitsWithLabel() {
611611
assertEquals(2, splits.size());
612612

613613
// check duration
614-
final int margin = 20000000;
614+
final int margin = 100_000_000;
615615
assertTrue(splits.get(0).getDuration() >= 100000000 && splits.get(0).getDuration() < 100000000 + margin);
616616
assertTrue(splits.get(1).getDuration() >= 200000000 && splits.get(1).getDuration() < 200000000 + margin);
617617

0 commit comments

Comments
 (0)