Skip to content

Commit 5908e99

Browse files
committed
adds tck test at ES
1 parent 9c24a25 commit 5908e99

File tree

4 files changed

+55
-0
lines changed

4 files changed

+55
-0
lines changed

elasticsearch-driver/pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,26 @@
4646
<artifactId>elasticsearch-rest-high-level-client</artifactId>
4747
<version>${es.version}</version>
4848
</dependency>
49+
<dependency>
50+
<groupId>jakarta.nosql.tck.communication.driver</groupId>
51+
<artifactId>driver-tck-document</artifactId>
52+
<version>${jakarta.nosql.version}</version>
53+
<scope>test</scope>
54+
</dependency>
4955
</dependencies>
56+
57+
<build>
58+
<plugins>
59+
<plugin>
60+
<groupId>org.apache.maven.plugins</groupId>
61+
<artifactId>maven-surefire-plugin</artifactId>
62+
<version>${maven.surefire.plugin.version}</version>
63+
<configuration>
64+
<dependenciesToScan>
65+
<dependency>jakarta.nosql.tck.communication.driver:driver-tck-document</dependency>
66+
</dependenciesToScan>
67+
</configuration>
68+
</plugin>
69+
</plugins>
70+
</build>
5071
</project>
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.elasticsearch.document;
16+
17+
import jakarta.nosql.document.DocumentCollectionManager;
18+
import jakarta.nosql.tck.communication.driver.document.DocumentCollectionManagerSupplier;
19+
20+
public class ElasticsearchDocumentCollectionManagerSupplier implements DocumentCollectionManagerSupplier {
21+
22+
private static final String DATABASE = "tck-database";
23+
24+
@Override
25+
public DocumentCollectionManager get() {
26+
final ElasticsearchDocumentCollectionManagerFactory factory = ElasticsearchDocumentCollectionManagerFactorySupplier.INSTANCE.get();
27+
return factory.get(DATABASE);
28+
}
29+
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.jnosql.diana.elasticsearch.document.ElasticsearchDocumentCollectionManagerSupplier
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

0 commit comments

Comments
 (0)