I want to override properties defined in application.properties in tests, but @TestPropertySource only allows to provide predefined values.
What I need is to start a
You could override the value of the port property in the @BeforeClass like this:
@BeforeClass
@BeforeClass public static void beforeClass() { System.setProperty("zookeeper.port", getRandomPort()); }