diff --git a/provider/junit5/src/main/kotlin/au/com/dius/pact/provider/junit5/PactJUnit5VerificationProvider.kt b/provider/junit5/src/main/kotlin/au/com/dius/pact/provider/junit5/PactJUnit5VerificationProvider.kt index 603c140dc5..c8d29fcfc2 100644 --- a/provider/junit5/src/main/kotlin/au/com/dius/pact/provider/junit5/PactJUnit5VerificationProvider.kt +++ b/provider/junit5/src/main/kotlin/au/com/dius/pact/provider/junit5/PactJUnit5VerificationProvider.kt @@ -1,10 +1,6 @@ package au.com.dius.pact.provider.junit5 -import au.com.dius.pact.core.model.BrokerUrlSource -import au.com.dius.pact.core.model.Interaction -import au.com.dius.pact.core.model.Pact -import au.com.dius.pact.core.model.ProviderState -import au.com.dius.pact.core.model.RequestResponseInteraction +import au.com.dius.pact.core.model.* import au.com.dius.pact.core.support.expressions.SystemPropertyResolver import au.com.dius.pact.core.support.expressions.ValueResolver import au.com.dius.pact.core.support.handleWith @@ -295,7 +291,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()