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

Mock ports for multiple providers not being respected #1684

Closed
edeandrea opened this issue Apr 10, 2023 · 3 comments
Closed

Mock ports for multiple providers not being respected #1684

edeandrea opened this issue Apr 10, 2023 · 3 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@edeandrea
Copy link

This stems from the enhancement in #1675 when I tried to implement it.

Adding @MockServerConfig annotations to a class is not respected if you have multiple mock server configs, but for a certain test, only 1 of the providers is used.

I created a simple reproducer project at https://github.com/edeandrea/pact-multi-provider. The main README.md file has all the details.

You can see in that project that in the test which uses both mocks from both providers the mock server ports are respected, but in tests that only use a single mock provider, the ports set in the MockServerConfig are not respected.

@edeandrea
Copy link
Author

Something I noticed as well - it seems to have something to do with using @PactTestFor(pactMethod = ...) vs @PactTestFor(pactMethods = ...)

@rholshausen rholshausen added bug Indicates an unexpected problem or unintended behavior smartbear-supported labels Apr 12, 2023
@github-actions
Copy link

👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-930). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.

See our documentation for more information.

@rholshausen
Copy link
Contributor

Thanks for the example project, it made it easy to diagnose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants