Shaun Mendham
05/26/2022, 8:07 AMservice-name
and service-name-kafka
)
What I am seeing currently with a single provider name across two test classes, is that all contracts for the provider are run against both types of which the opposite type contracts fail.Shaun Mendham
05/26/2022, 8:08 AMYousaf Nabi (pactflow.io)
Pact specification V4 is here! We worked hard on listening to the community, after the release of v3, 5 years ago. We consolidation many of the requests people made about things that haven’t worked quite properly. One of the biggest changes is consolidation the file format to allow for HTTP and message interactions with a single file.
• 📹 See an AMA from 2021 where Ron Holshausen took us through “?”
• 📙 Read the V4 spec RFC for a full list of changes: https://github.com/pact-foundation/pact-specification/issues/71
• 🚀 Implementations in Rust core and JVM has been completed
🌍 All our Pact specifications are open-source and you can see them all here
Shaun Mendham
05/30/2022, 8:48 AMShaun Mendham
05/30/2022, 2:54 PMInteractionFilter
to filter by interaction type. Still with one test file per interaction type, but filtering to only those supported by the test file. Does this sounds like a reasonable approach?Yousaf Nabi (pactflow.io)
Shaun Mendham
05/30/2022, 10:03 PMrholshausen
06/01/2022, 12:40 AMShaun Mendham
06/01/2022, 7:51 AMrholshausen
06/01/2022, 8:02 AMrholshausen
06/01/2022, 8:04 AM@Consumer
annotation to each provider test and it will only run the verification for that consumerShaun Mendham
06/01/2022, 8:08 AM@Consumer
Which looks like it’s working 👍
I guess this issue would come back if we ever had a single consumer asserting multiple interaction types against the same provider. Where we would then need something like the filter. Or alternatively multiple provider names.Shaun Mendham
06/01/2022, 8:13 AMShaun Mendham
06/01/2022, 8:13 AMShaun Mendham
06/01/2022, 8:58 AM@Consumer
works for the demo use case, however with the annotation only accepting a single consumer name. This would mean needing to duplicate the provider test files, or add additional boilerplate per consumer, rather than adding a new consumer string which might have been an acceptable overhead 🤔
Our real scenario is something like:
• Provider A (Kafka and REST)
• Consumer B consumes Kafka of Provider A
• Consumer C consumes REST of Provider A
• Consumer D consumes REST of Provider A
• Consumer E consumes REST of Provider A
• …