You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to update the library of my provider test wrote it in Kotlin with Junit5 from:
testImplementation 'au.com.dius:pact-jvm-provider-junit5_2.12:3.6.16'
to the newest version: 'au.com.dius.pact.provider:junit5:4.6.16'
(I'm using a gradle task) and I can see now that the provider test is failing with: No Pact files were found to verify Provider: ev_replacement Source: Pact Broker https://pact-broker-01.X.net:443 consumerVersionSelectors=[Selector(tag=version1, latest=true, consumer=ev_article, fallbackTag=)] au.com.dius.pact.provider.junitsupport.loader.NoPactsFoundException: No Pact files were found to verify
The test is annotated like this:
`@Provider("ev_replacement")
And it simply doesn't find the contract anymore. I spend 2 days on this.
I've played and changed all this parameters multiple times. I can confirm that the contract is posted in Pact broker with the tag version1, with version 0.0.1.
Why I'm getting every time that the contract doesn't exists?
The contract was generated and posted to pact broker using: testImplementation 'au.com.dius.pact.consumer:junit5:4.6.16'
If I'm using:
@PactUrl(
urls = ["https://pact-broker-01.X.net/pacts/provider/ev_replacement/consumer/ev_article/version/0.0.1"]
)
the provider test pass without errors, but I cannot publish the results back to pact broker because it expects an object of this type: BrokerUrlSource, and not UrlSource
Whats wrong with all the library version over 4.x.x? I've tested with different 4.x.x version and I'm getting the same result.
Can someone please help me with this issue? I'm really blocked right now
The text was updated successfully, but these errors were encountered:
Whats wrong with all the library version over 4.x.x?
Huh!
3.6.x was first released in 2018. So what you are asking is why do my pact tests and broker configured to work in 2018 not work with Pact test from 2024. Because things have changed.
Pact-JVM does not control what Pacts get verified. It passes the request on to the Pact Broker, which then returns the Pacts to be verified. So the issue is why is your Pact broker not returning the Pacts you expect?
You can try update your work flow to use branches, but it needs to do this on all sides to work (consumer and provider). You also need to check what version of the Pact Broker you are running.
The other thing is to add debug logs, change some values and see what requests are being made to your Pact Broker and what it is responding with. For instance, try removing consumer="ev_article" and check the logs. The Pact Broker knows who the consumers of your provider are, there is no need to tell it.
Indeed, that was the reason, the old pact broker instance that wasn't maintained at all and no one knew about it. We just created an up to date pact broker instance. I will close this issue. And thanks for your suggestions.
Hello guys!
I've tried to update the library of my provider test wrote it in Kotlin with Junit5 from:
testImplementation 'au.com.dius:pact-jvm-provider-junit5_2.12:3.6.16'
to the newest version: 'au.com.dius.pact.provider:junit5:4.6.16'
(I'm using a gradle task) and I can see now that the provider test is failing with:
No Pact files were found to verify Provider: ev_replacement Source: Pact Broker https://pact-broker-01.X.net:443 consumerVersionSelectors=[Selector(tag=version1, latest=true, consumer=ev_article, fallbackTag=)] au.com.dius.pact.provider.junitsupport.loader.NoPactsFoundException: No Pact files were found to verify
The test is annotated like this:
`@Provider("ev_replacement")
@ExtendWith(PactVerificationInvocationContextProvider::class)
@PactBroker(
host = "pact-broker-01.X.net",
scheme = "https",
port = "443",
consumerVersionSelectors = [
VersionSelector(tag = "version1", latest = "true", consumer="ev_article")
]
)`
And it simply doesn't find the contract anymore. I spend 2 days on this.
I've played and changed all this parameters multiple times. I can confirm that the contract is posted in Pact broker with the tag version1, with version 0.0.1.
Why I'm getting every time that the contract doesn't exists?
The contract was generated and posted to pact broker using: testImplementation 'au.com.dius.pact.consumer:junit5:4.6.16'
If I'm using:
@PactUrl(
urls = ["https://pact-broker-01.X.net/pacts/provider/ev_replacement/consumer/ev_article/version/0.0.1"]
)
the provider test pass without errors, but I cannot publish the results back to pact broker because it expects an object of this type: BrokerUrlSource, and not UrlSource
Whats wrong with all the library version over 4.x.x? I've tested with different 4.x.x version and I'm getting the same result.
Can someone please help me with this issue? I'm really blocked right now
The text was updated successfully, but these errors were encountered: