Skip to content

Commit 119c78b

Browse files
committed
Skip flaky StopWatch time assertions
1 parent d8e18f5 commit 119c78b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-core/src/test/java/org/springframework/util/StopWatchTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ void validUsage() throws Exception {
9797
assertThat(stopWatch.currentTaskName()).isEqualTo(name2);
9898
stopWatch.stop();
9999
assertThat(stopWatch.isRunning()).isFalse();
100+
101+
/* Flaky StopWatch time assertions...
100102
assertThat(stopWatch.getLastTaskTimeNanos())
101103
.as("last task time in nanoseconds for task #2")
102104
.isGreaterThanOrEqualTo(millisToNanos(duration2))
@@ -109,6 +111,7 @@ void validUsage() throws Exception {
109111
.as("total time in seconds for task #2")
110112
.isGreaterThanOrEqualTo((duration1 + duration2 - fudgeFactor) / 1000.0)
111113
.isLessThanOrEqualTo((duration1 + duration2 + fudgeFactor) / 1000.0);
114+
*/
112115

113116
assertThat(stopWatch.getTaskCount()).isEqualTo(2);
114117
assertThat(stopWatch.prettyPrint()).contains(name1, name2);

0 commit comments

Comments
 (0)