From e93b11ad1947ee9dbef56965b5e7363ae53d2b0f Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Mon, 19 Feb 2024 15:48:42 +0000 Subject: [PATCH] chore(deps) : upgrade versions and adds shedlock deps --- .../docker/docker-compose.yml | 2 +- scheduler/boot-shedlock-sample/pom.xml | 39 ++++++------------- .../db/changelog/migration/01-init.sql | 7 ++++ .../db/changelog/migration/01-init.xml | 9 ----- .../shedlock/SchemaValidationTest.java | 2 +- .../shedlock/common/ContainersConfig.java | 2 +- 6 files changed, 21 insertions(+), 40 deletions(-) create mode 100644 scheduler/boot-shedlock-sample/src/main/resources/db/changelog/migration/01-init.sql delete mode 100644 scheduler/boot-shedlock-sample/src/main/resources/db/changelog/migration/01-init.xml diff --git a/scheduler/boot-shedlock-sample/docker/docker-compose.yml b/scheduler/boot-shedlock-sample/docker/docker-compose.yml index 7940a44b3..f01147a42 100644 --- a/scheduler/boot-shedlock-sample/docker/docker-compose.yml +++ b/scheduler/boot-shedlock-sample/docker/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: postgresqldb: - image: postgres:16.0-alpine + image: postgres:16.2-alpine environment: - POSTGRES_USER=appuser - POSTGRES_PASSWORD=secret diff --git a/scheduler/boot-shedlock-sample/pom.xml b/scheduler/boot-shedlock-sample/pom.xml index fbcd3ea41..5add6b6e3 100644 --- a/scheduler/boot-shedlock-sample/pom.xml +++ b/scheduler/boot-shedlock-sample/pom.xml @@ -7,7 +7,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.5 + 3.2.2 com.learning.shedlock @@ -21,13 +21,12 @@ UTF-8 17 - 2022.0.4 - 2.2.0 - 2.15.0 + 2.3.0 + 5.11.0 ${project.build.directory}/test-results - 2.40.0 - 8.4.2 + 2.43.0 + 9.0.9 1.2.1 3.10.0.2594 0.8.11 @@ -88,13 +87,14 @@ ${springdoc-openapi.version} - org.apache.commons - commons-lang3 + net.javacrumbs.shedlock + shedlock-spring + ${shedlock.version} - commons-io - commons-io - ${commons-io.version} + net.javacrumbs.shedlock + shedlock-provider-jdbc-template + ${shedlock.version} @@ -107,11 +107,6 @@ spring-boot-testcontainers test - - org.awaitility - awaitility - test - org.testcontainers junit-jupiter @@ -124,18 +119,6 @@ - - - - org.springframework.cloud - spring-cloud-dependencies - ${spring-cloud.version} - pom - import - - - - diff --git a/scheduler/boot-shedlock-sample/src/main/resources/db/changelog/migration/01-init.sql b/scheduler/boot-shedlock-sample/src/main/resources/db/changelog/migration/01-init.sql new file mode 100644 index 000000000..8a9404073 --- /dev/null +++ b/scheduler/boot-shedlock-sample/src/main/resources/db/changelog/migration/01-init.sql @@ -0,0 +1,7 @@ +CREATE TABLE lockProvider ( + name VARCHAR(64), + lock_until TIMESTAMP(3) NULL, + locked_at TIMESTAMP(3) NULL, + locked_by VARCHAR(255), + PRIMARY KEY (name) +) \ No newline at end of file diff --git a/scheduler/boot-shedlock-sample/src/main/resources/db/changelog/migration/01-init.xml b/scheduler/boot-shedlock-sample/src/main/resources/db/changelog/migration/01-init.xml deleted file mode 100644 index 9d3b8b9b3..000000000 --- a/scheduler/boot-shedlock-sample/src/main/resources/db/changelog/migration/01-init.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/scheduler/boot-shedlock-sample/src/test/java/com/learning/shedlock/SchemaValidationTest.java b/scheduler/boot-shedlock-sample/src/test/java/com/learning/shedlock/SchemaValidationTest.java index 6f161b162..c2bde5bbe 100644 --- a/scheduler/boot-shedlock-sample/src/test/java/com/learning/shedlock/SchemaValidationTest.java +++ b/scheduler/boot-shedlock-sample/src/test/java/com/learning/shedlock/SchemaValidationTest.java @@ -7,7 +7,7 @@ properties = { "spring.jpa.hibernate.ddl-auto=validate", "spring.test.database.replace=none", - "spring.datasource.url=jdbc:tc:postgresql:16.0-alpine:///db" + "spring.datasource.url=jdbc:tc:postgresql:16.2-alpine:///db" }) class SchemaValidationTest { diff --git a/scheduler/boot-shedlock-sample/src/test/java/com/learning/shedlock/common/ContainersConfig.java b/scheduler/boot-shedlock-sample/src/test/java/com/learning/shedlock/common/ContainersConfig.java index 75cd5da76..a1475bc5a 100644 --- a/scheduler/boot-shedlock-sample/src/test/java/com/learning/shedlock/common/ContainersConfig.java +++ b/scheduler/boot-shedlock-sample/src/test/java/com/learning/shedlock/common/ContainersConfig.java @@ -12,6 +12,6 @@ public class ContainersConfig { @Bean @ServiceConnection PostgreSQLContainer postgreSQLContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.0-alpine")); + return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.2-alpine")); } }