1
0
mirror of https://github.com/square/okhttp.git synced 2026-10-24 07:59:29 +03:00
Files
HyundooPark fc9a83dd58 Start @StartStop fields for @Nested JUnit 5 tests (#9634)
StartStopExtension.beforeEach resolved instance fields from
context.testInstance (the innermost @Nested instance) and
context.requiredTestClass (the nested class), so a @StartStop
MockWebServer field declared on an enclosing class was never started.
A nested test that touched the server failed with "call start() first".

Walk context.requiredTestInstances.allInstances instead and start the
annotated fields on every instance in the hierarchy. Behavior is
unchanged for non-nested tests, where allInstances is the single
test instance.
2026-08-08 11:57:24 -04:00
..