Update the samples to use @WebIntegrationTest and randomPort=true
Closes gh-4294 Closes gh-4271
This commit is contained in:
committed by
Andy Wilkinson
parent
acf6f2193b
commit
1c5e445554
@@ -19,11 +19,10 @@ package sample.metrics.opentsdb;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.WebIntegrationTest;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
/**
|
||||
* Basic integration tests for {@link SampleOpenTsdbExportApplication}.
|
||||
@@ -32,8 +31,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(SampleOpenTsdbExportApplication.class)
|
||||
@WebAppConfiguration
|
||||
@IntegrationTest("server.port=0")
|
||||
@WebIntegrationTest(randomPort = true)
|
||||
@DirtiesContext
|
||||
public class SampleOpenTsdbExportApplicationTests {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user