Commit 2fdf1d9
authored
(Fix): Parses correct timestamp from test suites (#215)
Fixes issues in #209, and verified on the _actual_ bundle junits we were seeing in https://github.com/trunk-io/trunk/actions/runs/12267338838/job/34227320055?pr=19962

- `timestamp` _is not_ an actual part of the well-accepted JUnit spec for [**test cases**](https://github.com/nextest-rs/quick-junit/blob/main/src/report.rs#L309-L312)--only some tools support it, including our C++ test reporters, which I had been using for testing before
- `timestamp` _is_ a more common part of the JUnit spec for [**test suites**](https://github.com/nextest-rs/quick-junit/blob/main/src/report.rs#L167-L168), including [example](https://github.com/testmoapp/junitxml?tab=readme-ov-file#complete-junit-xml-example) and in the [Jest reporter](https://github.com/jest-community/jest-junit/blob/master/README.md) we use
- Using the suite as a fallback should cover our bases and allow us to properly fallback for the sake of quarantining and dogfooding this
- It's worth noting that everywhere I could find, `timestamp` refers to the start time. In theory if you intentionally ran 3 test runs in parallel (rather than jest retries' serial) you might get different results depending on finishing order. In theory, this is acceptable behavior since such a test would be considered flaky (eventually) anyway, but that leaves potential for follow-up work if/when we have a clear use case.1 parent d90f1ab commit 2fdf1d9
File tree
3 files changed
+45
-2
lines changed- cli
- src
- test_fixtures
3 files changed
+45
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| |||
150 | 155 | | |
151 | 156 | | |
152 | 157 | | |
153 | | - | |
| 158 | + | |
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
| |||
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
187 | | - | |
| 192 | + | |
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
| |||
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
| 323 | + | |
318 | 324 | | |
319 | 325 | | |
| 326 | + | |
320 | 327 | | |
321 | 328 | | |
322 | 329 | | |
| |||
346 | 353 | | |
347 | 354 | | |
348 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
349 | 378 | | |
350 | 379 | | |
351 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments