-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Pending interactions in pact-jvm #1707
Comments
If you use the For example: .expectsToReceiveHttpInteraction("V4 PactProviderTest test interaction", httpBuilder -> {
return httpBuilder
.withRequest(requestBuilder -> requestBuilder
.path("/")
.method("GET"))
.willRespondWith(responseBuilder -> responseBuilder
.status(200)
.body("{\"responsetest\": true, \"version\": \"v3\"}")
.header("test", notEmpty("Example"))
)
.pending(true); // <---
}) |
Thx for the incredible fast feedback. This works. Thank you so much. |
Hi pact-jvm/consumer/src/main/kotlin/au/com/dius/pact/consumer/dsl/PactBuilder.kt Lines 82 to 101 in a91598b
But then how to achieve the same with Async? I can use the PactBuilder and set the pending flag, but then I am facing issues with creating the content of my expectations. I could find:
The other option is: pact-jvm/consumer/src/main/kotlin/au/com/dius/pact/consumer/dsl/PactBuilder.kt Lines 246 to 255 in a91598b
but then I would need to guess pact-jvm/consumer/src/main/kotlin/au/com/dius/pact/consumer/dsl/PactBuilder.kt Lines 268 to 282 in a91598b
Is there a way to use a builder here and not just a map? |
I've added the missing methods to SynchronousMessagePactBuilder. You can also use |
Hi,
I found this issue pact-foundation/pact-specification/issues/73 and I was wondering how I can set this in pact-jvm. I could find that the model contains the value:
pact-jvm/core/model/src/main/kotlin/au/com/dius/pact/core/model/V4Pact.kt
Line 139 in bb4010b
But I am not sure how I can set this in my consumer test. I searched in the
@Pact
annotation and also via thePactDslWithProvider
, which we are using to define our expectations. But I could not find a way to do so.What is the appropriate way to set this pending state?
Br,
Chris
PS: Is there a documentation regarding this value? I can only find the pending pacts docs, but nothing regarding pending interactions set by the consumer.
The text was updated successfully, but these errors were encountered: