Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] jnosql-arangodb - _system access required for any database connection #298

Merged
merged 5 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion jnosql-arangodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<description>The Eclipse JNoSQL layer to ArangoDB</description>

<properties>
<arango.driver>7.11.0</arango.driver>
<arango.driver>7.13.0</arango.driver>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private ArangoDBUtil() {
static void checkDatabase(String database, ArangoDB arangoDB) {
Objects.requireNonNull(database, "database is required");
try {
Collection<String> databases = arangoDB.getDatabases();
Collection<String> databases = arangoDB.getAccessibleDatabases();
if (!databases.contains(database)) {
arangoDB.createDatabase(database);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,4 +36,4 @@ public void shouldReturnFromConfigurationQuery() {
Assertions.assertNotNull(configuration);
Assertions.assertTrue(configuration instanceof ArangoDBKeyValueConfiguration);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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");
}

Expand Down Expand Up @@ -129,4 +127,4 @@ void getArangoDB() {
assertThat(adb.getVersion()).isNotNull();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -156,4 +155,4 @@ public void shouldNegate() {

}

}
}