From 82320e1391dc271cb74869b1056c2483e4c346bc Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sun, 24 Nov 2024 04:06:54 +0000 Subject: [PATCH 1/5] chore: upgrade arangodb to version 7.13.0 Signed-off-by: Otavio Santana --- jnosql-arangodb/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jnosql-arangodb/pom.xml b/jnosql-arangodb/pom.xml index 89b1c5dd9..76e955056 100644 --- a/jnosql-arangodb/pom.xml +++ b/jnosql-arangodb/pom.xml @@ -28,7 +28,7 @@ The Eclipse JNoSQL layer to ArangoDB - 7.11.0 + 7.13.0 From e417c4148b116203e8fc627656dd93164105a16b Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sun, 24 Nov 2024 04:11:48 +0000 Subject: [PATCH 2/5] feat: enhancement at the test class in ArangoDB Signed-off-by: Otavio Santana --- .../arangodb/communication/ArangoDBConfigurationTest.java | 8 +------- .../communication/ArangoDBDocumentManagerTest.java | 1 - .../communication/ArangoDBKeyValueEntityManagerTest.java | 6 ++---- .../arangodb/communication/QueryAQLConverterTest.java | 3 +-- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBConfigurationTest.java b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBConfigurationTest.java index 31232ea61..17defbb17 100644 --- a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBConfigurationTest.java +++ b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBConfigurationTest.java @@ -21,12 +21,6 @@ public class ArangoDBConfigurationTest { - private ArangoDBKeyValueConfiguration configuration; - - @BeforeEach - public void setUp() { - configuration = new ArangoDBKeyValueConfiguration(); - } @Test @@ -43,4 +37,4 @@ public void shouldReturnFromConfigurationQuery() { Assertions.assertNotNull(configuration); Assertions.assertTrue(configuration instanceof ArangoDBKeyValueConfiguration); } -} \ No newline at end of file +} diff --git a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBDocumentManagerTest.java b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBDocumentManagerTest.java index f2f3f774d..94311a80d 100644 --- a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBDocumentManagerTest.java +++ b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBDocumentManagerTest.java @@ -24,7 +24,6 @@ import org.eclipse.jnosql.communication.semistructured.Elements; import org.eclipse.jnosql.communication.semistructured.SelectQuery; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfSystemProperty; diff --git a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBKeyValueEntityManagerTest.java b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBKeyValueEntityManagerTest.java index 2aab93467..1f203acb5 100644 --- a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBKeyValueEntityManagerTest.java +++ b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBKeyValueEntityManagerTest.java @@ -42,8 +42,6 @@ public class ArangoDBKeyValueEntityManagerTest { private BucketManager keyValueEntityManager; - private BucketManagerFactory keyValueEntityManagerFactory; - private User userOtavio = new User("otavio"); private KeyValueEntity keyValueOtavio = KeyValueEntity.of("otavio", Value.of(userOtavio)); @@ -52,7 +50,7 @@ public class ArangoDBKeyValueEntityManagerTest { @BeforeEach public void init() { - keyValueEntityManagerFactory = KeyvalueDatabase.INSTANCE.get(); + BucketManagerFactory keyValueEntityManagerFactory = KeyvalueDatabase.INSTANCE.get(); keyValueEntityManager = keyValueEntityManagerFactory.apply("users-entity"); } @@ -129,4 +127,4 @@ void getArangoDB() { assertThat(adb.getVersion()).isNotNull(); } -} \ No newline at end of file +} diff --git a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/QueryAQLConverterTest.java b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/QueryAQLConverterTest.java index 9868635cc..c9f091552 100644 --- a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/QueryAQLConverterTest.java +++ b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/QueryAQLConverterTest.java @@ -18,7 +18,6 @@ import org.eclipse.jnosql.communication.semistructured.SelectQuery; import org.junit.jupiter.api.Test; -import java.util.List; import java.util.Map; import static org.eclipse.jnosql.communication.semistructured.SelectQuery.select; @@ -156,4 +155,4 @@ public void shouldNegate() { } -} \ No newline at end of file +} From 3c67e34a38623258aed4de5204dc3dc29168ff92 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sun, 24 Nov 2024 04:14:48 +0000 Subject: [PATCH 3/5] style: remove unsed imports at ArangodbConfiguration test Signed-off-by: Otavio Santana --- .../arangodb/communication/ArangoDBConfigurationTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBConfigurationTest.java b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBConfigurationTest.java index 17defbb17..d6c4d9ccc 100644 --- a/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBConfigurationTest.java +++ b/jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBConfigurationTest.java @@ -16,7 +16,6 @@ import org.eclipse.jnosql.communication.keyvalue.KeyValueConfiguration; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; public class ArangoDBConfigurationTest { From 47987623630daab40621d43ddd4b142d005eee50 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sun, 24 Nov 2024 04:16:59 +0000 Subject: [PATCH 4/5] feat: use getAccessibleDatabases at ARangoDBUtil Signed-off-by: Otavio Santana --- .../jnosql/databases/arangodb/communication/ArangoDBUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jnosql-arangodb/src/main/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBUtil.java b/jnosql-arangodb/src/main/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBUtil.java index c655e6d1e..014835b7c 100644 --- a/jnosql-arangodb/src/main/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBUtil.java +++ b/jnosql-arangodb/src/main/java/org/eclipse/jnosql/databases/arangodb/communication/ArangoDBUtil.java @@ -58,7 +58,7 @@ private ArangoDBUtil() { static void checkDatabase(String database, ArangoDB arangoDB) { Objects.requireNonNull(database, "database is required"); try { - Collection databases = arangoDB.getDatabases(); + Collection databases = arangoDB.getAccessibleDatabases(); if (!databases.contains(database)) { arangoDB.createDatabase(database); } From b237a90a4d1243476e60e3a65e2f98218eb9d379 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sun, 24 Nov 2024 04:52:09 +0000 Subject: [PATCH 5/5] docs: update changelog definition Signed-off-by: Otavio Santana --- CHANGELOG.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index d179a896c..7cb781f8a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -13,6 +13,7 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version === Fixed - Fixed the broken connection issue at JNoSQL Redis Database API +- Use `getAccessibleDatabases` method to get the databases at JNoSQL ArangoDB Database API == [1.1.2] - 2023-09-15