mirror of
https://github.com/square/okhttp.git
synced 2026-10-24 07:59:29 +03:00
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.