-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Multiple methods with pactMethods throwing "java.lang.IllegalStateException: server in wrong state" error #1457
Comments
Have the same problem |
@mefellows any ideas? |
This is reproduced when two pacts are specified with the same provider. Any chance to fix this? |
@SergeyPirogov @prashanth-sams builder
.uponReceiving("User request by phone")
...
.uponReceiving("User request by email")
...
.toPact() |
@DNAlchemist Does this mean I need to write all my consumer contracts in one super-long class? We have a api gateway design for our microservices, where the gateway could make requests to three different microservices/providers with a total of five requests.
This class will be ridiculously big in the end if that's the case. |
👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-927). 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. |
@Yrlish what @DNAlchemist is saying is that you can combine the two methods into one which sets up both interactions and you won't be affected by this issue, because the issue here as reported is where the provider is the same for both methods. It does not make sense to have two different methods for the same provider. If you have different providers, then you have to have different Pact methods, but then the provider names will be different so you won't be affected by this issue. |
@rholshausen Hi Ronald! So you're saying that the pattern of having one method for each endpoint is bad? If I have one method containing 20+ interactions of each different endpoint paths, how would I test this with the |
No, we are saying there is a work around while this issue is being fixed. The original example did not need multiple Pact methods (the ones annotated with |
…s were confgured for the same provider #1457
My consumer test
Pact-JVM version: 4.2.12
Error Log
The text was updated successfully, but these errors were encountered: