The “whacky” port comes from WireMockContextInitializer class where it starts up a WireMockServer at a random port (dynamicPort). Then, it overrides the value specified in, so then the test application will be pointing to that WireMockServer instance, instead of the hardcoded port 8089.

In WireMockContextInitializer class, this is the part that sets the OpenWeather base url for test.


It’s really hard to understand what is wrong with your case, because as I said, when I cloned the repo from Github and run the tests as they are, they work fine for me.

Have you tried to run ./gradlew clean build?

Written by

A passionate Software Engineer trying to leave a good legacy on earth

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store