[BAEL-9497] Fix failing context tests - part 1 (#7719)

* fixed context dependency issue and added LiveContext notes in persistence-modules/spring-data-couchbase-2 module

* fixed Context tests and added notes for spring-cloud-bus/spring-cloud-config-client module

* Added context test in spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server module, mainly due to incompatible dependencies, plus fixed parent pom path in different modules

* fixed context tests for spring-cloud/spring-cloud-task/springcloudtaskbatch module, renamed ContextLiveTest as IntegrationTest, now configured to run with an H2 embedded instance. Moved the run note to the application

* Added SpringContextLiveTests in persistence-modules/spring-data-mongodb module
This commit is contained in:
Ger Roza
2019-09-06 06:19:30 -03:00
committed by Josh Cummings
parent c709251eeb
commit e9e4f63313
19 changed files with 199 additions and 58 deletions

View File

@@ -0,0 +1,26 @@
package com.baeldung.contexttests.mongoconfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.baeldung.config.MongoConfig;
/**
* This Live test requires:
* * mongodb instance running on the environment
*
* (e.g. `docker run -d -p 27017:27017 --name bael-mongo mongo`)
*
*
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = MongoConfig.class)
public class SpringContextLiveTest {
@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}

View File

@@ -0,0 +1,26 @@
package com.baeldung.contexttests.mongoreactiveconfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.baeldung.config.MongoReactiveConfig;
/**
* This Live test requires:
* * mongodb instance running on the environment
*
* (e.g. `docker run -d -p 27017:27017 --name bael-mongo mongo`)
*
*
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = MongoReactiveConfig.class)
public class SpringContextLiveTest {
@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}

View File

@@ -0,0 +1,26 @@
package com.baeldung.contexttests.simplemongoconfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.baeldung.config.SimpleMongoConfig;
/**
* This Live test requires:
* * mongodb instance running on the environment
*
* (e.g. `docker run -d -p 27017:27017 --name bael-mongo mongo`)
*
*
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SimpleMongoConfig.class)
public class SpringContextLiveTest {
@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}