Hi all! I'm having an issue getting the provided ...
# pact-jvm
p
Hi all! I'm having an issue getting the provided consumer test running against the example client (provided as a reference implementation). Specifically,
provider.getUrl()
is returning
null
, which in turn causes the test to fail before the
ConsumerClient
is even invoked. I have it set up the test and example its own repo here. The full error message I'm getting follows:
Copy code
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running exampleclients.ExampleJavaConsumerPactRuleTest
Provider URL: null
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.027 s <<< FAILURE! - in exampleclients.ExampleJavaConsumerPactRuleTest
[ERROR] runTest(exampleclients.ExampleJavaConsumerPactRuleTest)  Time elapsed: 0.017 s  <<< FAILURE!
java.lang.AssertionError: Provider URL is null! Aborting test.
        at exampleclients.ExampleJavaConsumerPactRuleTest.runTest(ExampleJavaConsumerPactRuleTest.java:57)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   ExampleJavaConsumerPactRuleTest.runTest:57 Provider URL is null! Aborting test.
[INFO] 
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Versions used:
JDK 1.8
;
JUnit 4.8.2
;
Pact-JVM 4.1.43
m
Awesome, thanks for creating a repro - this is very helpful.
@rholshausen any ideas?
r
No idea, if you check the debug logs, maybe there is an error from one of your other dependencies that is stopping the test from being setup correctly.
p
@Matt (pactflow.io / pact-js / pact-go) sorry for the confusion... here's a branch with the actual example from pact-jvm with minimal changes to imports. @rholshausen thanks for the tip! We ended up finding a version combo that worked for us so we didn't pursue the investigation any further. Thanks y'all for the help!