Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JUnit5 extension bug when using both declarative + programmatic simultaneously #2123

Conversation

parawanderer
Copy link
Contributor

This fixes #2122, please see the issue described there for details.

This PR makes it so that the options of httpPort/httpsPort/httpsEnabled/proxyMode and anything else that might be configured through the @WireMockTest attribute for a declarative setup in JUnit5 does not override programmatically configured options.

declarative and programmatic approach simultaneously
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

+1 from me. With explicit configuration in test, there should be either the programmatic way taking a priority (this PR) or an immediate error. I prefer the approach in this PR too

@tomakehurst
Copy link
Member

Please can we fix the formatting issues so that the tests can run?

@oleg-nenashev oleg-nenashev added the needs-tom Tom's Train Project :) label May 6, 2023
@tomakehurst tomakehurst merged commit d25bdc5 into wiremock:master May 31, 2023
@tomakehurst
Copy link
Member

Thanks, and sorry for the wait!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-tom Tom's Train Project :)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Junit5 port configuration gets set incorrectly when mixing declarative and programmatic
3 participants