From 3145235116a43c9e8588a00ce80823b88d1489ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20Mo=CC=88ller?= Date: Thu, 14 Dec 2023 16:53:22 +0100 Subject: [PATCH 1/5] update some dependencies. httpclient is now included in the newer elasticsearch-rest-client in the until now provided version so we can remove it. setMaxWaitMillis is deprecated so we use setMaxWait now (which is internally the same) - fixes: SIRI-920 --- pom.xml | 15 ++++----------- src/main/java/sirius/db/jdbc/Database.java | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index aabb1bc0e..1ecd6d698 100644 --- a/pom.xml +++ b/pom.xml @@ -45,12 +45,12 @@ org.apache.commons commons-dbcp2 - 2.9.0 + 2.11.0 org.mongodb mongodb-driver-sync - 4.7.1 + 4.11.1 redis.clients @@ -67,19 +67,12 @@ org.elasticsearch.client elasticsearch-rest-client - 8.4.1 + 8.11.2 - - - org.apache.httpcomponents - httpclient - 4.5.13 - - org.mariadb.jdbc mariadb-java-client - 3.0.6 + 3.3.1 test diff --git a/src/main/java/sirius/db/jdbc/Database.java b/src/main/java/sirius/db/jdbc/Database.java index 0214a5ae5..0195a5bf9 100644 --- a/src/main/java/sirius/db/jdbc/Database.java +++ b/src/main/java/sirius/db/jdbc/Database.java @@ -353,7 +353,7 @@ private void initialize() { ds.setMaxIdle(maxIdle); ds.setTestOnBorrow(testOnBorrow); ds.setValidationQuery(validationQuery); - ds.setMaxWaitMillis(1000); + ds.setMaxWait(Duration.ofMillis(1000)); } } From 0d63000d53471395c0067f80c81f07633a8e2695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20Mo=CC=88ller?= Date: Mon, 18 Dec 2023 08:59:00 +0100 Subject: [PATCH 2/5] Upgrade to newest sirius dependencies - fixes: SIRI-920 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1ecd6d698..2dc102d50 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.scireum sirius-parent - 11.2.0 + 11.3.0 sirius-db DEVELOPMENT-SNAPSHOT @@ -19,7 +19,7 @@ http://www.sirius-lib.net - dev-40.0.0 + dev-42.0.0 From 914af2e30d5b63b74a64c3d46a27d9bdb07ed846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20Mo=CC=88ller?= Date: Mon, 18 Dec 2023 08:59:33 +0100 Subject: [PATCH 3/5] fix a test due to dependency-change and remove doubled JavaDoc - fixes: SIRI-920 --- src/test/kotlin/sirius/db/testutil/MongoMocks.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/test/kotlin/sirius/db/testutil/MongoMocks.kt b/src/test/kotlin/sirius/db/testutil/MongoMocks.kt index 47ed42f65..e1a91824b 100644 --- a/src/test/kotlin/sirius/db/testutil/MongoMocks.kt +++ b/src/test/kotlin/sirius/db/testutil/MongoMocks.kt @@ -8,7 +8,7 @@ package sirius.db.testutil -import io.mockk.spyk +import org.mockito.Mockito.spy import sirius.db.mixing.types.BaseEntityRef import sirius.db.mongo.MongoEntity import sirius.db.mongo.types.MongoRef @@ -19,14 +19,11 @@ import sirius.db.mongo.types.MongoRef class MongoMocks { companion object { /** - * Wrap an entity as a MongoRef - * @param entity which is to be wrapped - */ /** * Wrap an entity as a MongoRef * @param entity which is to be wrapped */ fun asMongoRef(entity: E): MongoRef { - val mongoRef = spyk(MongoRef.on(entity.javaClass, BaseEntityRef.OnDelete.IGNORE)) + val mongoRef = spy(MongoRef.on(entity.javaClass, BaseEntityRef.OnDelete.IGNORE)) mongoRef.setValue(entity) return mongoRef } From 3d5aaa2231ce49d93a34b6ba7f06cf1501d778e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20Mo=CC=88ller?= Date: Tue, 19 Dec 2023 16:06:13 +0100 Subject: [PATCH 4/5] update to latest parent version - fixes: SIRI-920 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2dc102d50..446827770 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.scireum sirius-parent - 11.3.0 + 11.5.0 sirius-db DEVELOPMENT-SNAPSHOT From d5fbda520991ddb29e8155034a9cae3011b604f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20Mo=CC=88ller?= Date: Tue, 19 Dec 2023 16:06:39 +0100 Subject: [PATCH 5/5] revert changing a test and use seconds instead of millis - fixes: SIRI-920 --- src/main/java/sirius/db/jdbc/Database.java | 2 +- src/test/kotlin/sirius/db/testutil/MongoMocks.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/sirius/db/jdbc/Database.java b/src/main/java/sirius/db/jdbc/Database.java index 0195a5bf9..9b153e5fe 100644 --- a/src/main/java/sirius/db/jdbc/Database.java +++ b/src/main/java/sirius/db/jdbc/Database.java @@ -353,7 +353,7 @@ private void initialize() { ds.setMaxIdle(maxIdle); ds.setTestOnBorrow(testOnBorrow); ds.setValidationQuery(validationQuery); - ds.setMaxWait(Duration.ofMillis(1000)); + ds.setMaxWait(Duration.ofSeconds(1)); } } diff --git a/src/test/kotlin/sirius/db/testutil/MongoMocks.kt b/src/test/kotlin/sirius/db/testutil/MongoMocks.kt index e1a91824b..1a40414d8 100644 --- a/src/test/kotlin/sirius/db/testutil/MongoMocks.kt +++ b/src/test/kotlin/sirius/db/testutil/MongoMocks.kt @@ -8,7 +8,7 @@ package sirius.db.testutil -import org.mockito.Mockito.spy +import io.mockk.spyk import sirius.db.mixing.types.BaseEntityRef import sirius.db.mongo.MongoEntity import sirius.db.mongo.types.MongoRef @@ -23,7 +23,7 @@ class MongoMocks { * @param entity which is to be wrapped */ fun asMongoRef(entity: E): MongoRef { - val mongoRef = spy(MongoRef.on(entity.javaClass, BaseEntityRef.OnDelete.IGNORE)) + val mongoRef = spyk(MongoRef.on(entity.javaClass, BaseEntityRef.OnDelete.IGNORE)) mongoRef.setValue(entity) return mongoRef }