Closed metteo closed 7 months ago
I have overridden filtering method and included above condition / conversion logic. I can confirm it works for executing the tests. Not sure about publishing the verifications, will report tomorrow.
So I identified another problem. During conversion to RequestResponsePact
source
field is initialized with a default UnknownPactSource
instead of the one from V4Pact
which is BrokerUrlSource
. This prevents publishing of verifications.
Support was only added for JUnit 5. None of the JUnit 4 code has been touched.
@rholshausen thanks for the reply. It confirmed my suspicions.
As I mentioned above I was able to make minor modifications on top of SpringRestPactRunner to enable support of V4 pacts. I tested the whole provider part so: fetching from broker, running the tests and publishing the verifications back (but only for RequestResponsePact).
I'm not sure what your plans are regarding junit4 and V4Pact. Is the combination unsupported for the provider side? Are there plans to implement it but at a later stage?
I'm asking because I have a project with some hard to untangle dependencies (spring, camel, junit4 based integration test) where switching to junit5 is planned but will take time.
Hi
Asking here instead of SO because it seems to be a bug / omission.
I have a situation where consumer is publishing a V4Pact in pactflow. Provider test is fetching it correctly (under debugger) but then PactRestRunner filters it out because it's not an instance of
RequestResponsePact
...I'm wondering if that filtering expression should include
|| pact.isRequestReponsePact()
and some conversion logic (pact.asRequestResponsePact()
) down the line.I'm using pact-jvm 4.3.x which is marked as unsupported, but PactRestRunner was not touched since 2020..