@@ -44,7 +44,8 @@ object DefaultTestResultAccumulator : TestResultAccumulator, KLogging() {
44
44
} else {
45
45
interactionResults[interactionHash] = testResult.merge(testExecutionResult)
46
46
}
47
- if (allInteractionsVerified(pact, interactionResults)) {
47
+ val unverifiedInteractions = unverifiedInteractions(pact, interactionResults)
48
+ if (unverifiedInteractions.isEmpty()) {
48
49
logger.debug {
49
50
" All interactions for Pact ${pact.provider.name} -${pact.consumer.name} have a verification result"
50
51
}
@@ -58,7 +59,10 @@ object DefaultTestResultAccumulator : TestResultAccumulator, KLogging() {
58
59
}
59
60
testResults.remove(pactHash)
60
61
} else {
61
- logger.info { " Not all of the ${pact.interactions.size} were verified." }
62
+ logger.warn { " Not all of the ${pact.interactions.size} were verified. The following were missing:" }
63
+ unverifiedInteractions.forEach {
64
+ logger.warn { " ${it.description} " }
65
+ }
62
66
}
63
67
}
64
68
@@ -83,9 +87,9 @@ object DefaultTestResultAccumulator : TestResultAccumulator, KLogging() {
83
87
84
88
private fun lookupProviderTag (): String? = System .getProperty(" pact.provider.tag" )
85
89
86
- fun allInteractionsVerified (pact : Pact <out Interaction >, results : MutableMap <Int , TestResult >): Boolean {
90
+ fun unverifiedInteractions (pact : Pact <out Interaction >, results : MutableMap <Int , TestResult >): List < Interaction > {
87
91
logger.debug { " Number of interactions #${pact.interactions.size} and results: ${results.values} " }
88
- return pact.interactions.all { results.containsKey(calculateInteractionHash(it)) }
92
+ return pact.interactions.filter { ! results.containsKey(calculateInteractionHash(it)) }
89
93
}
90
94
91
95
override fun clearTestResult (pact : Pact <out Interaction >) {
0 commit comments