Skip to content

New @StartStop extension for JUnit 5#8862

Merged
swankjesse merged 2 commits into
masterfrom
jwilson.0617.start_stop
Jun 18, 2025
Merged

New @StartStop extension for JUnit 5#8862
swankjesse merged 2 commits into
masterfrom
jwilson.0617.start_stop

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

This is a new take on our JUnit 5 extension. Rather than creating and managing the MockWebServer instance in the extension, we let the user create it and all the extension does is manage the lifecycle.

Note that this annotation doesn't require any external configuration - it doesn't need a system-property to opt-into 'automatic' extensions, and it doesn't require a class-level extension either.

This is a new take on our JUnit 5 extension. Rather than creating and managing
the MockWebServer instance in the extension, we let the user create it and all
the extension does is manage the lifecycle.

Note that this annotation doesn't require any external configuration - it doesn't
need a system-property to opt-into 'automatic' extensions, and it doesn't require
a class-level extension either.
@swankjesse
swankjesse requested a review from yschimke June 18, 2025 02:17

@yschimke yschimke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this is annoying, looks much better.

@swankjesse
swankjesse merged commit 5659f0f into master Jun 18, 2025
22 checks passed
@swankjesse
swankjesse deleted the jwilson.0617.start_stop branch June 18, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants