This message was deleted.
# help
s
This message was deleted.
l
This is off the top of my head at the moment but I think if you set the port to
0
it should try a dynamic port. I think there might even be a method you can use on the Wiremock options -
options().dynamicPort()
g
the question is that the feing client path should be set in application.properties file. then it cant get the correct path with random port
Copy code
feign.clent.url=<http://localhost:9561>
in application properties file
l
Ah, I see. Will need to take a look at that as I am not sure how that would work. Quick question, are you using wiremock standalone ? It looks like you have imported the standalone version with the dependency you specified above. I was wondering if it should be this import ?
Copy code
testImplementation "org.wiremock:wiremock:3.1.0"
g
yeah, using
testImplementation 'org.wiremock:wiremock-standalone:3.0.4'
Copy code
testImplementation "org.wiremock:wiremock:3.1.0"
this dependency throws exception related to jakarta if remember right
event if restarting the wiremockserver.start() and .stop() in before and after it does not help
I have implemented this approach.
o
The port is randomly assigned by default, though you might be hitting such issues when running multiple tests in parallel processes on the systems that do not have much entropy