Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fail the build if verification fails against a pending pact. #52

Merged
merged 3 commits into from Sep 12, 2021

Conversation

kflorence
Copy link
Contributor

@kflorence kflorence commented Aug 22, 2021

Fixes #51

This also includes the sbt-ide-settings plugin and configures the project so that when it is imported into the IntelliJ IDE it will exclude Scala 2.12 and Java 8 dependencies and projects. This prevents classpath conflicts (e.g. the same classes existing in 4 different contexts) and allows for a normal development experience (including the ability to run and debug tests from the IDE).

@kflorence
Copy link
Contributor Author

kflorence commented Sep 11, 2021

Examples of test output.

MUnit

pact4s.munit.PendingPactVerificationTestSuite:
  + pending pact failure should be skipped 0.275s
[info] Passed: Total 1, Failed 0, Errors 0, Passed 1
[success] Total time: 5 s, completed Sep 11, 2021, 5:28:05 PM

Looks like MUnit doesn't log anything when a test is skipped, just marks it as passed. Maybe this is a common/okay expectation for that library? If not, we could add some logs ourselves, but it seems strange that the library wouldn't do that itself.

ScalaTest

[info] PendingPactVerificationTestSuite:
[info] pending pact failure
[info] - should be skipped !!! CANCELED !!!
[info]   Verification failed [PENDING]: "description" (PendingPactVerificationTestSuite.scala:6)
[info] Run completed in 3 seconds, 86 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 1, ignored 0, pending 0
[info] No tests were executed.
[success] Total time: 8 s, completed Sep 11, 2021, 5:28:38 PM

Weaver

[info] pact4s.weaver.PendingPactVerificationTestSuite
[info] - pending pact failure should be skipped 253ms !!! CANCELLED !!!
[info]   Verification failed [PENDING]: "description" (PendingPactVerificationTestSuite.scala:7)
[info] Passed: Total 0, Failed 0, Errors 0, Passed 0, Canceled 1
[success] Total time: 9 s, completed Sep 11, 2021, 5:33:16 PM

@kflorence kflorence marked this pull request as ready for review September 11, 2021 22:36
@jbwheatley jbwheatley merged commit 5ad9eb4 into jbwheatley:main Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VerificationResult.Failed should not cause tests to fail if the pact is pending
2 participants