If I have two Pact test classes (1 test per state)...
# pact-jvm
t
If I have two Pact test classes (1 test per state) that run, as soon as I added
@PactFilter
annotation, with the exact string of the state, then both tests fail to find pacts. Without the annotation it breaks because a test only contains one state. Do I have to have all states in each test file together with the
@PactFilter
?
r
Do the interactions in the Pact file require both provider states?
t
I figured out that if I add
Copy code
@PactBroker(url = "<https://the-url/>"
    , consumerVersionSelectors = {@VersionSelector(consumer = "one-consumer")}
)
in the first test, and
Copy code
@PactBroker(url = "<https://the-url/>"
    , consumerVersionSelectors = {@VersionSelector(consumer = "the-other-consumer")}
)
in the other test, they pass. I will hard-code this for now, until I find a good way to tag the consumers.