diff --git a/nakadi-producer-starter-spring-boot-2-test/src/test/java/org/zalando/nakadiproducer/tests/ApplicationWithMockClientIT.java b/nakadi-producer-starter-spring-boot-2-test/src/test/java/org/zalando/nakadiproducer/tests/ApplicationWithMockClientIT.java index a0a6a051..e335fc44 100644 --- a/nakadi-producer-starter-spring-boot-2-test/src/test/java/org/zalando/nakadiproducer/tests/ApplicationWithMockClientIT.java +++ b/nakadi-producer-starter-spring-boot-2-test/src/test/java/org/zalando/nakadiproducer/tests/ApplicationWithMockClientIT.java @@ -27,12 +27,18 @@ webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT ) public class ApplicationWithMockClientIT { + + @LocalManagementPort + private int localManagementPort; + @ClassRule public static final EnvironmentVariables environmentVariables = new EnvironmentVariables(); - @LocalManagementPort - private int localManagementPort; + @BeforeClass + public static void fakeCredentialsDir() { + environmentVariables.set("CREDENTIALS_DIR", new File("src/main/test/tokens").getAbsolutePath()); + } @Autowired private MockNakadiPublishingClient mockClient; @@ -40,11 +46,6 @@ public class ApplicationWithMockClientIT { @Autowired private EventTransmitter eventTransmitter; - @BeforeClass - public static void fakeCredentialsDir() { - environmentVariables.set("CREDENTIALS_DIR", new File("src/main/test/tokens").getAbsolutePath()); - } - @Before @After public void cleanUpMock() {