Skip to content

Commit

Permalink
feat: use the same system property for filtering interactions as Grad…
Browse files Browse the repository at this point in the history
…le/Maven #1104
  • Loading branch information
Ronald Holshausen committed Jun 11, 2020
1 parent a586137 commit 9d2fe1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion provider/junit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public class PactJUnitTest {

**(version 4.1.2+)**

You can filter the interactions that are run by setting the JVM system property `pact.filter.interaction`. This propery
You can filter the interactions that are run by setting the JVM system property `pact.filter.description`. This propery
takes a regular expression to match against the interaction description.

**NOTE!** this property needs to be set on the test JVM if your build is running with Gradle or Maven.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ open class InteractionRunner<I>(
}

private fun interactionIncluded(interaction: Interaction): Boolean {
val interactionFilter = System.getProperty("pact.filter.interaction")
val interactionFilter = System.getProperty("pact.filter.description")
return interactionFilter.isNullOrEmpty() || interaction.description.matches(Regex(interactionFilter))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ open class PactVerificationInvocationContextProvider : TestTemplateInvocationCon
filterPactsByAnnotations(pacts, context.requiredTestClass)
}.filter { p -> consumerName == null || p.consumer.name == consumerName }

val interactionFilter = System.getProperty("pact.filter.interaction")
val interactionFilter = System.getProperty("pact.filter.description")
return Pair(pactSources.flatMap { pact ->
pact.interactions
.filter {
Expand Down

0 comments on commit 9d2fe1c

Please sign in to comment.