Skip to content

Commit

Permalink
fix: Don't publish incomplete verification results #1166
Browse files Browse the repository at this point in the history
  • Loading branch information
tinexw committed Jul 9, 2020
1 parent 5ce9447 commit f5d01e5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package au.com.dius.pact.provider.junit5

import au.com.dius.pact.core.model.BrokerUrlSource
import au.com.dius.pact.core.model.FilteredPact
import au.com.dius.pact.core.model.Interaction
import au.com.dius.pact.core.model.Pact
import au.com.dius.pact.core.model.ProviderState
Expand Down Expand Up @@ -295,7 +296,11 @@ class PactVerificationExtension(
override fun afterTestExecution(context: ExtensionContext) {
val store = context.getStore(ExtensionContext.Namespace.create("pact-jvm"))
val testContext = store.get("interactionContext") as PactVerificationContext
testResultAccumulator.updateTestResult(pact, interaction, testContext.testExecutionResult, pactSource)
if (pact is FilteredPact) {
testResultAccumulator.updateTestResult(pact.pact, interaction, testContext.testExecutionResult, pactSource)
} else {
testResultAccumulator.updateTestResult(pact, interaction, testContext.testExecutionResult, pactSource)
}
}

companion object : KLogging()
Expand Down

0 comments on commit f5d01e5

Please sign in to comment.