GH-1126 Fixed default app port in Tests

Ensured AggregateApplicationTests, AggregateWithMainTest and AggregationTest arn't using default 8080 port
This commit is contained in:
Oleg Zhurakousky
2017-11-08 13:06:40 -05:00
parent b9884ae71a
commit 4e69ead7b4
3 changed files with 22 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ package org.springframework.cloud.stream.test.aggregate.main;
import java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -42,6 +43,11 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class AggregateWithMainTest {
@Before
public void before() {
System.setProperty("server.port", "0");
}
@SuppressWarnings("unchecked")
@Test
public void testAggregateApplication() throws InterruptedException {