...
com.hee.tis.esr.common.transactions.test
# | Class | Description |
---|---|---|
1 |
| This abstract class has some tests which check that Rabbit and Mongo Transactions are setup correctly. It relies on the superclass having a ‘@SpringBootTest’ which refers to the Spring Boot Application (ESR microservice ) that has Rabbit and Mongo Transactions enabled and configured correctly. The test code is common but the Configuration of the Spring Boot Application will be specific to each ESR microservice. To create an instance of this test
Instances of this test create their own Rabbit and Mongo Resources to check that each Spring Boot application has transactions correctly configured. A concrete example of this can be found in the ESR Data Export service - the class is |
2 |
| A Spring annotation which Enables Mongo Repositories and loads the Spring Config from |
3 |
| Test Spring Bean Configuration. Creates a test queue, sets up a RabbitMQ listener which will put any messages received from the test queue into another Spring Bean which is a simple list of Strings (for testing). |
4 |
| A POJO which maps to the Test Mongo Collection called |
5 |
| A Test Spring Data Mongo Repository interface for the TxMessage POJO & |
6 |
| A Test Spring Service which is used to test Rabbit and Mongo Transactions. The process method sends RabbitMQ messages and updates MongoDB and can conditionally throw Exceptions. |
7 |
| Contains public constants like test queue names, this package name ( for Spring Scanning), Test Spring Bean names, the Spring profile name for bringing MongoDb with ReplicaSet as a a Test Container. |
com.hee.tis.esr.common.autoconfigure
...