question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When publishing verification results, only the errors are sent

See original GitHub issue

When publishing verification results, only the errors are being sent. This causes the Pact broker to see the passing interactions as un-verified.

For a test with 3 interactions, if two pass and one fails, the following entries are logged:

Received test result 'au.com.dius.pact.core.pactbroker.TestResult$Ok@3f693160' for Pact pactflow-example-provider-springboot-pactflow-example-consumer and a request to get a product (Pact Broker https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-springboot/consumer/pactflow-example-consumer/pact-version/4a6c2017e4f913c5b18ee0b526eae842567bf489)
2020-12-08 12:27:12.818 DEBUG 33876 --- [    Test worker] a.c.d.p.p.DefaultTestResultAccumulator   : Number of interactions #3 and results: [au.com.dius.pact.core.pactbroker.TestResult$Ok@3f693160]
2020-12-08 12:27:12.818  WARN 33876 --- [    Test worker] a.c.d.p.p.DefaultTestResultAccumulator   : Not all of the 3 were verified. The following were missing:
2020-12-08 12:27:12.818  WARN 33876 --- [    Test worker] a.c.d.p.p.DefaultTestResultAccumulator   :     a request to get a product
2020-12-08 12:27:12.818  WARN 33876 --- [    Test worker] a.c.d.p.p.DefaultTestResultAccumulator   :     a request to get all products
2020-12-08 12:27:13.029 DEBUG 33876 --- [    Test worker] a.c.d.p.p.DefaultTestResultAccumulator   : Received test result 'au.com.dius.pact.core.pactbroker.TestResult$Ok@3f693160' for Pact pactflow-example-provider-springboot-pactflow-example-consumer and a request to get all products (Pact Broker https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-springboot/consumer/pactflow-example-consumer/pact-version/4a6c2017e4f913c5b18ee0b526eae842567bf489)
2020-12-08 12:27:13.030 DEBUG 33876 --- [    Test worker] a.c.d.p.p.DefaultTestResultAccumulator   : Number of interactions #3 and results: [au.com.dius.pact.core.pactbroker.TestResult$Ok@3f693160, Failed(results=[{interactionId=ba08b56e3fecb8a49c7f7a2d509d9fe3183a44cf, attribute=status, description=expected status of 404 but was 200}], description=Response status did not match), au.com.dius.pact.core.pactbroker.TestResult$Ok@3f693160]
2020-12-08 12:27:13.030 DEBUG 33876 --- [    Test worker] a.c.d.p.p.DefaultTestResultAccumulator   : All interactions for Pact pactflow-example-provider-springboot-pactflow-example-consumer have a verification result

Then when the results are published:

2020-12-08 12:27:13.447 DEBUG 33876 --- [    Test worker] a.c.d.p.c.pactbroker.PactBrokerClient    : Test result = Failed(results=[{interactionId=ba08b56e3fecb8a49c7f7a2d509d9fe3183a44cf, attribute=status, description=expected status of 404 but was 200}], description=Response status did not match)
2020-12-08 12:27:13.448 DEBUG 33876 --- [    Test worker] a.c.dius.pact.core.pactbroker.HalClient  : Posting JSON to https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-springboot/consumer/pactflow-example-consumer/pact-version/4a6c2017e4f913c5b18ee0b526eae842567bf489/verification-results
{"providerApplicationVersion":"cdbbf3f+1607390821","success":false,"testResults":[{"interactionId":"ba08b56e3fecb8a49c7f7a2d509d9fe3183a44cf","mismatches":[{"attribute":"status","description":"expected status of 404 but was 200"}],"success":false}]}

Only the error is sent.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Rafaespcommented, Nov 8, 2021

I can confirm the verification status is not unknown anymore! thanks!

1reaction
Rafaespcommented, Jul 1, 2021

@mefellows When verifications fail, can-i-deploy also fails. That works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Provider verification results | Pact Docs
The pact verification tool can automatically publish the verification results back to the broker, and they will be displayed on the index page ......
Read more >
Troubleshoot Facebook and Instagram publishing errors
These are the most common publishing errors we get from Facebook and Instagram, along with recommendations for how to fix them.
Read more >
Verification, Updates, and Corrections | 2022-2023 Federal ...
Because students sometimes make errors on their application, there is a process for verifying applications and making corrections.
Read more >
Pact does not send provider-verification result to pact broker if ...
The provider-test loads these and trys to verificat them. But the test uploads the results only if the verification is succesfull. I tried ......
Read more >
Fix common Google Ads Editor errors
This error is triggered when our system doesn't receive any response after a certain amount of time and can be due to transient...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found