Commit 0bcdad0
committed
Address flakiness of
The `DataFileWatchTest` appears to be [flaky](https://ge.quarkus.io/scans/tests?search.relativeStartTime=P90D&search.timeZoneId=Europe%2FLondon&tests.container=io.quarkus.jacoco.runtime.DataFileWatchTest&tests.test=waitForDataFileThatNeverAppears).
The failed assertion (`Future.isDone()`) in the `waitForDataFileThatNeverAppears()` test case asserts that the data-file watch function is still running. Is is technically not guaranteed, as the test executor thread may not get scheduled until the `DataFileWatch.waitForDataFile()` function finished.
This change updates the assertion in the mentioned test case to `assertThat(future).succeedsWithin(FUTURE_WAIT_DURATION).isEqualTo...`, which is good enough.
Additional, related changes:
* Remove the racy/flaky assertion on `Future.isDone()`
* Increase the future-wait-duration to a very long time to account for stalled test executions in GH CI workflows (many things running concurrently/in-parallel).
* Unify all test cases to use the same approach
Fixes the flaky test reported in #30315 by @Sannei.q..jacoco.runtime.DataFileWatchTest
1 parent c9a0600 commit 0bcdad0
File tree
1 file changed
+14
-10
lines changed- test-framework/jacoco/runtime/src/test/java/io/quarkus/jacoco/runtime
1 file changed
+14
-10
lines changedLines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | | - | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
139 | | - | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
145 | | - | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
177 | | - | |
| 181 | + | |
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
185 | | - | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
208 | | - | |
209 | | - | |
| 212 | + | |
| 213 | + | |
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| |||
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
241 | | - | |
242 | | - | |
| 245 | + | |
| 246 | + | |
243 | 247 | | |
244 | 248 | | |
245 | 249 | | |
| |||
0 commit comments