Use @SpringBootTest.properties in tests and samples
Closes gh-13453
This commit is contained in:
committed by
Stephane Nicoll
parent
01da6ea30a
commit
870d7fe16a
@@ -27,7 +27,6 @@ import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
@@ -45,9 +44,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
* @author Dave Syer
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
// 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" })
|
||||
@ActiveProfiles("scratch")
|
||||
// Separate profile for web tests to avoid clashing databases
|
||||
|
||||
Reference in New Issue
Block a user