Skip to content

Commit 1c9b90f

Browse files
authored
Merge pull request #159 from eclipse/tck_driver
Appends the TCK drivers to the NoSQL drivers
2 parents 81898b8 + 2d2b1e2 commit 1c9b90f

File tree

70 files changed

+944
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+944
-61
lines changed

arangodb-driver/pom.xml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<description>The Eclipse JNoSQL communication layer, Diana, to AranboDB</description>
2929

3030
<properties>
31-
<arango.driver>6.6.2</arango.driver>
31+
<arango.driver>6.6.3</arango.driver>
3232
</properties>
3333
<dependencies>
3434
<dependency>
@@ -51,5 +51,33 @@
5151
<artifactId>arangodb-java-driver</artifactId>
5252
<version>${arango.driver}</version>
5353
</dependency>
54+
<dependency>
55+
<groupId>jakarta.nosql.tck.communication.driver</groupId>
56+
<artifactId>driver-tck-key-value</artifactId>
57+
<version>${jakarta.nosql.version}</version>
58+
<scope>test</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>jakarta.nosql.tck.communication.driver</groupId>
62+
<artifactId>driver-tck-document</artifactId>
63+
<version>${jakarta.nosql.version}</version>
64+
<scope>test</scope>
65+
</dependency>
5466
</dependencies>
67+
68+
<build>
69+
<plugins>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-surefire-plugin</artifactId>
73+
<version>${maven.surefire.plugin.version}</version>
74+
<configuration>
75+
<dependenciesToScan>
76+
<dependency>jakarta.nosql.tck.communication.driver:driver-tck-key-value</dependency>
77+
<dependency>jakarta.nosql.tck.communication.driver:driver-tck-document</dependency>
78+
</dependenciesToScan>
79+
</configuration>
80+
</plugin>
81+
</plugins>
82+
</build>
5583
</project>

arangodb-driver/src/main/java/org/eclipse/jnosql/diana/arangodb/document/ArangoDBDocumentCollectionManagerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import com.arangodb.ArangoDB;
1919
import jakarta.nosql.document.DocumentCollectionManagerFactory;
2020

21-
final class ArangoDBDocumentCollectionManagerFactory implements DocumentCollectionManagerFactory{
21+
final class ArangoDBDocumentCollectionManagerFactory implements DocumentCollectionManagerFactory {
2222

2323

2424
private final ArangoDB arangoDB;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2020 Otávio Santana and others
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* and Apache License v2.0 which accompanies this distribution.
6+
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
7+
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
8+
*
9+
* You may elect to redistribute this code under either of these licenses.
10+
*
11+
* Contributors:
12+
*
13+
* Otavio Santana
14+
*/
15+
package org.eclipse.jnosql.diana.arangodb.document;
16+
17+
import jakarta.nosql.document.DocumentCollectionManager;
18+
import jakarta.nosql.tck.communication.driver.document.DocumentCollectionManagerSupplier;
19+
20+
import static org.eclipse.jnosql.diana.arangodb.document.ArangoDBDocumentCollectionManagerFactorySupplier.INSTANCE;
21+
22+
public class ArangoDBDocumentCollectionManagerSupplier implements DocumentCollectionManagerSupplier {
23+
24+
private static final String DATABASE = "tck-database";
25+
26+
@Override
27+
public DocumentCollectionManager get() {
28+
return INSTANCE.get().get(DATABASE);
29+
}
30+
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2020 Otávio Santana and others
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* and Apache License v2.0 which accompanies this distribution.
6+
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
7+
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
8+
*
9+
* You may elect to redistribute this code under either of these licenses.
10+
*
11+
* Contributors:
12+
*
13+
* Otavio Santana
14+
*/
15+
package org.eclipse.jnosql.diana.arangodb.keyvalue;
16+
17+
import jakarta.nosql.keyvalue.BucketManager;
18+
import jakarta.nosql.keyvalue.BucketManagerFactory;
19+
import jakarta.nosql.tck.communication.driver.keyvalue.BucketManagerSupplier;
20+
21+
public class ArangoDBBucketManagerSupplier implements BucketManagerSupplier {
22+
23+
private static final String BUCKET = "tck-users-entity";
24+
25+
@Override
26+
public BucketManager get() {
27+
final BucketManagerFactory factory = BucketManagerFactorySupplier.INSTANCE.get();
28+
return factory.getBucketManager(BUCKET);
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.jnosql.diana.arangodb.document.ArangoDBDocumentCollectionManagerSupplier
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.jnosql.diana.arangodb.keyvalue.ArangoDBBucketManagerSupplier
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
query.1=insert person {"_id": 1, "name": "Diana"}
2+
query.2=insert person {"_id": 2, "name": "Artemis"}
3+
id.name=_id

cassandra-driver/pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,26 @@
5151
<artifactId>java-driver-query-builder</artifactId>
5252
<version>${casandra.driver.version}</version>
5353
</dependency>
54+
<dependency>
55+
<groupId>jakarta.nosql.tck.communication.driver</groupId>
56+
<artifactId>driver-tck-column</artifactId>
57+
<version>${jakarta.nosql.version}</version>
58+
<scope>test</scope>
59+
</dependency>
5460
</dependencies>
61+
62+
<build>
63+
<plugins>
64+
<plugin>
65+
<groupId>org.apache.maven.plugins</groupId>
66+
<artifactId>maven-surefire-plugin</artifactId>
67+
<version>${maven.surefire.plugin.version}</version>
68+
<configuration>
69+
<dependenciesToScan>
70+
<dependency>jakarta.nosql.tck.communication.driver:driver-tck-column</dependency>
71+
</dependenciesToScan>
72+
</configuration>
73+
</plugin>
74+
</plugins>
75+
</build>
5576
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2020 Otávio Santana and others
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* and Apache License v2.0 which accompanies this distribution.
6+
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
7+
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
8+
*
9+
* You may elect to redistribute this code under either of these licenses.
10+
*
11+
* Contributors:
12+
*
13+
* Otavio Santana
14+
*/
15+
package org.eclipse.jnosql.diana.cassandra.column;
16+
17+
import jakarta.nosql.column.ColumnFamilyManager;
18+
import jakarta.nosql.column.ColumnFamilyManagerFactory;
19+
import jakarta.nosql.tck.communication.driver.column.ColumnFamilyManagerSupplier;
20+
21+
public class CassandraColumnFamilyManagerSupplier implements ColumnFamilyManagerSupplier {
22+
23+
private static final String KEY_SPACE = "newKeySpace";
24+
25+
@Override
26+
public ColumnFamilyManager get() {
27+
ColumnFamilyManagerFactory factory = ManagerFactorySupplier.INSTANCE.get();
28+
return factory.get(KEY_SPACE);
29+
}
30+
31+
}

cassandra-driver/src/test/java/org/eclipse/jnosql/diana/cassandra/column/CassandraColumnFamilyManagerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public void shouldReturnErrorWhenUpdateWithColumnsNull() {
171171
}
172172

173173
@Test
174-
public void shouldReturnErrorWhenUpdatetWithColumnNull() {
174+
public void shouldReturnErrorWhenUpdateWithColumnNull() {
175175
assertThrows(NullPointerException.class, () -> {
176176
entityManager.update((ColumnEntity) null);
177177
});

0 commit comments

Comments
 (0)