From 0bffb582d5ca168295b85dd10becb2275efcb526 Mon Sep 17 00:00:00 2001 From: Maximillian Arruda Date: Tue, 12 Mar 2024 15:02:31 -0300 Subject: [PATCH 1/4] test(integration): fix the couchbase.properties index information Signed-off-by: Maximillian Arruda --- jnosql-couchbase/src/test/resources/couchbase.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jnosql-couchbase/src/test/resources/couchbase.properties b/jnosql-couchbase/src/test/resources/couchbase.properties index 6828fc37b..c59d22506 100644 --- a/jnosql-couchbase/src/test/resources/couchbase.properties +++ b/jnosql-couchbase/src/test/resources/couchbase.properties @@ -16,4 +16,4 @@ jnosql.couchbase.host=couchbase://localhost jnosql.couchbase.user=root jnosql.couchbase.password=123456 jnosql.couchbase.collections=Book,person,AppointmentBook,jnosql -jnosql.couchbase.index=Book \ No newline at end of file +jnosql.couchbase.index=Book,person,AppointmentBook,jnosql \ No newline at end of file From cb481e71c943bc1d9ab9462fd9e1dca0301f3a6d Mon Sep 17 00:00:00 2001 From: Maximillian Arruda Date: Tue, 12 Mar 2024 15:03:54 -0300 Subject: [PATCH 2/4] test(integration): added sleep time to the test avoiding eventual inconsistency issue Signed-off-by: Maximillian Arruda --- .../communication/CouchbaseDocumentManagerTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jnosql-couchbase/src/test/java/org/eclipse/jnosql/databases/couchbase/communication/CouchbaseDocumentManagerTest.java b/jnosql-couchbase/src/test/java/org/eclipse/jnosql/databases/couchbase/communication/CouchbaseDocumentManagerTest.java index 94723a563..885a04061 100644 --- a/jnosql-couchbase/src/test/java/org/eclipse/jnosql/databases/couchbase/communication/CouchbaseDocumentManagerTest.java +++ b/jnosql-couchbase/src/test/java/org/eclipse/jnosql/databases/couchbase/communication/CouchbaseDocumentManagerTest.java @@ -120,14 +120,15 @@ void shouldUpdate() { } @Test - void shouldRemoveEntityByName() { + void shouldRemoveEntityByName() throws InterruptedException { CommunicationEntity documentEntity = entityManager.insert(getEntity()); - + Thread.sleep(1_000L); Element name = documentEntity.find("name").get(); SelectQuery query = select().from(COLLECTION_PERSON_NAME).where(name.name()).eq(name.get()).build(); DeleteQuery deleteQuery = delete().from(COLLECTION_PERSON_NAME) .where(name.name()).eq(name.get()).build(); entityManager.delete(deleteQuery); + Thread.sleep(1_000L); assertTrue(entityManager.select(query).collect(Collectors.toList()).isEmpty()); } From 3ce50a4064f8466079f1c1e74039fa728df9dec7 Mon Sep 17 00:00:00 2001 From: Maximillian Arruda Date: Tue, 12 Mar 2024 15:04:53 -0300 Subject: [PATCH 3/4] test(integration): fixed @AddPackage declaration Signed-off-by: Maximillian Arruda --- .../couchbase/integration/TemplateIntegrationTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jnosql-couchbase/src/test/java/org/eclipse/jnosql/databases/couchbase/integration/TemplateIntegrationTest.java b/jnosql-couchbase/src/test/java/org/eclipse/jnosql/databases/couchbase/integration/TemplateIntegrationTest.java index 05b25b825..b0e79928e 100644 --- a/jnosql-couchbase/src/test/java/org/eclipse/jnosql/databases/couchbase/integration/TemplateIntegrationTest.java +++ b/jnosql-couchbase/src/test/java/org/eclipse/jnosql/databases/couchbase/integration/TemplateIntegrationTest.java @@ -19,12 +19,12 @@ import jakarta.inject.Inject; import jakarta.nosql.Template; import org.eclipse.jnosql.databases.couchbase.communication.CouchbaseUtil; -import jakarta.nosql.Convert; import org.eclipse.jnosql.databases.couchbase.communication.Database; +import org.eclipse.jnosql.mapping.core.Converters; +import org.eclipse.jnosql.mapping.core.spi.EntityMetadataExtension; import org.eclipse.jnosql.mapping.document.DocumentTemplate; import org.eclipse.jnosql.mapping.document.spi.DocumentExtension; import org.eclipse.jnosql.mapping.reflection.Reflections; -import org.eclipse.jnosql.mapping.core.spi.EntityMetadataExtension; import org.eclipse.jnosql.mapping.semistructured.EntityConverter; import org.jboss.weld.junit5.auto.AddExtensions; import org.jboss.weld.junit5.auto.AddPackages; @@ -42,7 +42,7 @@ import static org.eclipse.jnosql.communication.driver.IntegrationTest.NAMED; @EnableAutoWeld -@AddPackages(value = {Database.class, EntityConverter.class, DocumentTemplate.class}) +@AddPackages(value = {Database.class, Converters.class, EntityConverter.class, DocumentTemplate.class}) @AddPackages(Book.class) @AddExtensions({EntityMetadataExtension.class, DocumentExtension.class}) From 0d3ab0a0a01eec982e8b2e539d377d8d7a26bb55 Mon Sep 17 00:00:00 2001 From: Maximillian Arruda Date: Tue, 12 Mar 2024 15:57:11 -0300 Subject: [PATCH 4/4] test(integration): fixed @AddPackage declaration Signed-off-by: Maximillian Arruda --- .../integration/ElasticsearchTemplateIntegrationTest.java | 3 ++- .../integration/RepositoryIntegrationTest.java | 6 +++--- .../elasticsearch/integration/TemplateIntegrationTest.java | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/ElasticsearchTemplateIntegrationTest.java b/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/ElasticsearchTemplateIntegrationTest.java index 6fa6443f8..81aaf65fd 100644 --- a/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/ElasticsearchTemplateIntegrationTest.java +++ b/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/ElasticsearchTemplateIntegrationTest.java @@ -21,6 +21,7 @@ import org.eclipse.jnosql.databases.elasticsearch.communication.ElasticsearchConfigurations; import org.eclipse.jnosql.databases.elasticsearch.mapping.ElasticsearchTemplate; import org.eclipse.jnosql.mapping.Database; +import org.eclipse.jnosql.mapping.core.Converters; import org.eclipse.jnosql.mapping.core.config.MappingConfigurations; import org.eclipse.jnosql.mapping.document.DocumentTemplate; import org.eclipse.jnosql.mapping.document.spi.DocumentExtension; @@ -47,7 +48,7 @@ import static org.eclipse.jnosql.communication.driver.IntegrationTest.NAMED; @EnableAutoWeld -@AddPackages(value = {Database.class, EntityConverter.class, DocumentTemplate.class}) +@AddPackages(value = {Database.class, Converters.class, EntityConverter.class, DocumentTemplate.class}) @AddPackages(Book.class) @AddPackages(ElasticsearchTemplate.class) @AddExtensions({EntityMetadataExtension.class, diff --git a/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/RepositoryIntegrationTest.java b/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/RepositoryIntegrationTest.java index a46d71fd8..65fb3e409 100644 --- a/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/RepositoryIntegrationTest.java +++ b/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/RepositoryIntegrationTest.java @@ -20,13 +20,13 @@ import org.eclipse.jnosql.databases.elasticsearch.communication.DocumentDatabase; import org.eclipse.jnosql.databases.elasticsearch.communication.ElasticsearchConfigurations; import org.eclipse.jnosql.databases.elasticsearch.mapping.ElasticsearchTemplate; -import jakarta.nosql.Convert; import org.eclipse.jnosql.mapping.Database; +import org.eclipse.jnosql.mapping.core.Converters; import org.eclipse.jnosql.mapping.core.config.MappingConfigurations; +import org.eclipse.jnosql.mapping.core.spi.EntityMetadataExtension; import org.eclipse.jnosql.mapping.document.DocumentTemplate; import org.eclipse.jnosql.mapping.document.spi.DocumentExtension; import org.eclipse.jnosql.mapping.reflection.Reflections; -import org.eclipse.jnosql.mapping.core.spi.EntityMetadataExtension; import org.eclipse.jnosql.mapping.semistructured.EntityConverter; import org.jboss.weld.junit5.auto.AddExtensions; import org.jboss.weld.junit5.auto.AddPackages; @@ -51,7 +51,7 @@ import static org.eclipse.jnosql.communication.driver.IntegrationTest.NAMED; @EnableAutoWeld -@AddPackages(value = {Database.class, EntityConverter.class, DocumentTemplate.class}) +@AddPackages(value = {Database.class, Converters.class, EntityConverter.class, DocumentTemplate.class}) @AddPackages(Book.class) @AddPackages(ElasticsearchTemplate.class) @AddExtensions({EntityMetadataExtension.class, diff --git a/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/TemplateIntegrationTest.java b/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/TemplateIntegrationTest.java index e32fd1bbc..93e5dbd03 100644 --- a/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/TemplateIntegrationTest.java +++ b/jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration/TemplateIntegrationTest.java @@ -19,13 +19,13 @@ import org.awaitility.Awaitility; import org.eclipse.jnosql.databases.elasticsearch.communication.DocumentDatabase; import org.eclipse.jnosql.databases.elasticsearch.communication.ElasticsearchConfigurations; -import jakarta.nosql.Convert; import org.eclipse.jnosql.mapping.Database; +import org.eclipse.jnosql.mapping.core.Converters; import org.eclipse.jnosql.mapping.core.config.MappingConfigurations; +import org.eclipse.jnosql.mapping.core.spi.EntityMetadataExtension; import org.eclipse.jnosql.mapping.document.DocumentTemplate; import org.eclipse.jnosql.mapping.document.spi.DocumentExtension; import org.eclipse.jnosql.mapping.reflection.Reflections; -import org.eclipse.jnosql.mapping.core.spi.EntityMetadataExtension; import org.eclipse.jnosql.mapping.semistructured.EntityConverter; import org.jboss.weld.junit5.auto.AddExtensions; import org.jboss.weld.junit5.auto.AddPackages; @@ -47,7 +47,7 @@ import static org.eclipse.jnosql.communication.driver.IntegrationTest.NAMED; @EnableAutoWeld -@AddPackages(value = {Database.class, EntityConverter.class, DocumentTemplate.class}) +@AddPackages(value = {Database.class, Converters.class, EntityConverter.class, DocumentTemplate.class}) @AddPackages(Book.class) @AddPackages(Reflections.class) @AddExtensions({EntityMetadataExtension.class,