Commit 262f9e4
authored
See #155
ScopedObject must implement both ExtensionContext.Store.CloseableResource
and AutoCloseable to ensure proper cleanup across all JUnit 5.x versions.
JUnit 5.9.x and earlier only recognize CloseableResource for automatic
cleanup. Without it, ScopedObject.close() is never called, causing
resources (Vertx instances, HTTP servers) to leak between test iterations.
JUnit 5.11+ added AutoCloseable support, but we need both interfaces
for backward compatibility with users on older JUnit versions.
Signed-off-by: Thomas Segismont <[email protected]>
1 parent 5e9e371 commit 262f9e4
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
0 commit comments