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 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 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); } 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..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,17 +16,10 @@ 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 { - private ArangoDBKeyValueConfiguration configuration; - - @BeforeEach - public void setUp() { - configuration = new ArangoDBKeyValueConfiguration(); - } @Test @@ -43,4 +36,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 +}