Skip to content

Commit

Permalink
PI-2616 Don't attempt to drop schema when using TestContainers
Browse files Browse the repository at this point in the history
This resolves connection errors at the end of the integration tests, and it shaves ~1 minute off the build time for each project - which is a nice saving

* Before:
```
SPRING_PROFILES_ACTIVE=integration-test,oracle ./gradlew clean approved-premises-and-delius:integrationTest --no-build-cache
...
BUILD SUCCESSFUL in 3m 41s
89 actionable tasks: 26 executed, 63 up-to-date
```

* After:
```
SPRING_PROFILES_ACTIVE=integration-test,oracle ./gradlew clean approved-premises-and-delius:integrationTest --no-build-cache
...
BUILD SUCCESSFUL in 2m 46s
89 actionable tasks: 26 executed, 63 up-to-date
```
  • Loading branch information
marcus-bcl committed Oct 31, 2024
1 parent 9c4bad5 commit 9531d5b
Show file tree
Hide file tree
Showing 44 changed files with 132 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
4 changes: 3 additions & 1 deletion projects/arns-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
4 changes: 3 additions & 1 deletion projects/cas2-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
4 changes: 3 additions & 1 deletion projects/cas3-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ messaging.consumer.queue: message-queue

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ poller:

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
4 changes: 3 additions & 1 deletion projects/dps-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
4 changes: 3 additions & 1 deletion projects/ims-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
4 changes: 3 additions & 1 deletion projects/oasys-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ offender-events:

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
4 changes: 3 additions & 1 deletion projects/opd-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
4 changes: 3 additions & 1 deletion projects/soc-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ spring.datasource.url: jdbc:h2:mem:./test;MODE=Oracle;DEFAULT_NULL_ORDERING=HIGH

---
spring.config.activate.on-profile: oracle
spring.datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
spring:
datasource.url: 'jdbc:tc:oracle:slim-faststart:///XEPDB1'
jpa.hibernate.ddl-auto: create

---
spring.config.activate.on-profile: delius-db
Expand Down
Loading

0 comments on commit 9531d5b

Please sign in to comment.