# pact-jvm

Carl Ha

04/11/2022, 10:53 AM
Hello everyone! We currently have the problem that we have different providers test classes (for on one contract) located in different modules and therefore in different jvm's when running the tests. Therefore the provider sdk has no way of knowing when all interactions of the contract were validated and therefore never ends up publishing to the pact broker. Is there any existing solution to go about this? (Repost from General chat)

Francislainy Campos

04/11/2022, 12:40 PM
I think you should try and have one contract per provider.


04/12/2022, 12:38 AM
I'm a bit confused about having test classes for provider verification 🤔 but I think that's just a vocabulary niggle.
Interested in your module strategy, if the provider interface is genuinely fragmented into discrete modules, it implies that each one might be its own provider.
If that's not what you want, can the base project be the entry & integration point for the modules instead? i.e. set up one Pact-provider-annotated class for verification, provide all the states there, and verify them centrally
or, if not, I think each module would need a separate provider name, and verify in its own run
or merge your per-module verifications together, but that's absolute dragon territory