Skip to content

Commit fbcdae7

Browse files
committed
creates couchbase tck test
1 parent 9ce1537 commit fbcdae7

File tree

5 files changed

+46
-0
lines changed

5 files changed

+46
-0
lines changed

couchbase-driver/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@
5757
<version>${jakarta.nosql.version}</version>
5858
<scope>test</scope>
5959
</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>
6066
</dependencies>
6167

6268

@@ -69,6 +75,7 @@
6975
<configuration>
7076
<dependenciesToScan>
7177
<dependency>jakarta.nosql.tck.communication.driver:driver-tck-key-value</dependency>
78+
<dependency>jakarta.nosql.tck.communication.driver:driver-tck-document</dependency>
7279
</dependenciesToScan>
7380
</configuration>
7481
</plugin>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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.couchbase.document;
16+
17+
import jakarta.nosql.document.DocumentCollectionManager;
18+
import jakarta.nosql.tck.communication.driver.document.DocumentCollectionManagerSupplier;
19+
import org.eclipse.jnosql.diana.couchbase.CouchbaseUtil;
20+
import org.eclipse.jnosql.diana.couchbase.configuration.CouchbaseDocumentTcConfiguration;
21+
22+
public class CoucbaseDocumentCollectionManagerSupplier implements DocumentCollectionManagerSupplier {
23+
24+
25+
@Override
26+
public DocumentCollectionManager get() {
27+
CouchbaseDocumentConfiguration configuration = CouchbaseDocumentTcConfiguration.getTcConfiguration();
28+
CouhbaseDocumentCollectionManagerFactory managerFactory = configuration.get();
29+
return managerFactory.get(CouchbaseUtil.BUCKET_NAME);
30+
}
31+
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.jnosql.diana.couchbase.document.CoucbaseDocumentCollectionManagerSupplier
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
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"} 1 second
2+
query.2=insert person {"_id": 2, "name": "Artemis"} 1 second
3+
id.name=_id

0 commit comments

Comments
 (0)