You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error ("Unexpected end event") with pending pacts on pact-jvm version 4.1.17. #1221 mentioned the same thing but these pacts are for a service in production, so I don't think we had put things in a bad state - although I won't rule out the possibility. But I wanted to check if the following is correct:
From what I'm seeing, Gradle has a cache of tests it's executing as you said (in the other issue). It puts the current test in the cache when the Junit notifier calls the test started method. Pact does this manually here:
As you can see this doesn't happen if it's a pending pact. However further down the InteractionRunner calls the fireTestFinished method for pending pacts:
(the if statement for pending pacts happens a few lines later) - this causes the issue of "Unexpected end event". Should the call to fireTestFinished be wrapped in an if (!pending)?
What I'm not sure about is why this is happening for just this test - and not in any of the other services that run pact tests. I'll try debug through the same points and see what happens in other services tomorrow.
The text was updated successfully, but these errors were encountered:
For pending pacts, it should fire TestIgnored not TestStarted and then not fire TestFinished. It might be because the pending test is actually passing, so it is then firing the TestFinished event. I think it does need the if guard.
I'm getting this error ("Unexpected end event") with pending pacts on pact-jvm version 4.1.17. #1221 mentioned the same thing but these pacts are for a service in production, so I don't think we had put things in a bad state - although I won't rule out the possibility. But I wanted to check if the following is correct:
From what I'm seeing, Gradle has a cache of tests it's executing as you said (in the other issue). It puts the current test in the cache when the Junit notifier calls the test started method. Pact does this manually here:
pact-jvm/provider/junit/src/main/kotlin/au/com/dius/pact/provider/junit/InteractionRunner.kt
Line 158 in c91f44d
As you can see this doesn't happen if it's a pending pact. However further down the InteractionRunner calls the fireTestFinished method for pending pacts:
pact-jvm/provider/junit/src/main/kotlin/au/com/dius/pact/provider/junit/InteractionRunner.kt
Line 170 in c91f44d
if (!pending)
?What I'm not sure about is why this is happening for just this test - and not in any of the other services that run pact tests. I'll try debug through the same points and see what happens in other services tomorrow.
The text was updated successfully, but these errors were encountered: