Commit c738b73c authored by Stephane Nicoll's avatar Stephane Nicoll

Merge branch '2.0.x'

parents f8eedb04 ec02b561
...@@ -48,7 +48,6 @@ import org.springframework.context.annotation.Import; ...@@ -48,7 +48,6 @@ import org.springframework.context.annotation.Import;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
...@@ -59,9 +58,8 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -59,9 +58,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "management.endpoints.web.exposure.include=jolokia")
@DirtiesContext @DirtiesContext
@TestPropertySource(properties = "management.endpoints.web.exposure.include=jolokia")
public class JolokiaEndpointAutoConfigurationIntegrationTests { public class JolokiaEndpointAutoConfigurationIntegrationTests {
@Autowired @Autowired
......
...@@ -62,7 +62,6 @@ import org.springframework.context.annotation.Import; ...@@ -62,7 +62,6 @@ import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.test.web.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
...@@ -82,8 +81,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat ...@@ -82,8 +81,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat
* @author Jon Schneider * @author Jon Schneider
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = MetricsIntegrationTests.MetricsApp.class) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = MetricsIntegrationTests.MetricsApp.class, properties = "management.metrics.use-global-registry=false")
@TestPropertySource(properties = "management.metrics.use-global-registry=false")
public class MetricsIntegrationTests { public class MetricsIntegrationTests {
@Autowired @Autowired
......
...@@ -27,7 +27,6 @@ import org.junit.runner.RunWith; ...@@ -27,7 +27,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders;
...@@ -45,9 +44,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -45,9 +44,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest
// Enable JMX so we can test the MBeans (you can't do this in a properties file) // Enable JMX so we can test the MBeans (you can't do this in a properties file)
@TestPropertySource(properties = { "spring.jmx.enabled:true", @SpringBootTest(properties = { "spring.jmx.enabled:true",
"spring.datasource.jmx-enabled:true" }) "spring.datasource.jmx-enabled:true" })
@ActiveProfiles("scratch") @ActiveProfiles("scratch")
// Separate profile for web tests to avoid clashing databases // Separate profile for web tests to avoid clashing databases
......
...@@ -27,7 +27,6 @@ import org.springframework.boot.test.context.TestConfiguration; ...@@ -27,7 +27,6 @@ import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.boot.test.rule.OutputCapture; import org.springframework.boot.test.rule.OutputCapture;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.kafka.test.context.EmbeddedKafka; import org.springframework.kafka.test.context.EmbeddedKafka;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
...@@ -40,8 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -40,8 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest @SpringBootTest(properties = "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}")
@TestPropertySource(properties = "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}")
@EmbeddedKafka @EmbeddedKafka
public class SampleKafkaApplicationTests { public class SampleKafkaApplicationTests {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment