From b48dcfb6b2b01b547b0d61172d4569cd575e51f0 Mon Sep 17 00:00:00 2001 From: Jens Schulze Date: Mon, 14 Dec 2020 20:34:46 +0100 Subject: [PATCH] increase wait time for search index update --- .../commands/ProductCreateCommandIntegrationTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commercetools-models/src/test/java/io/sphere/sdk/products/commands/ProductCreateCommandIntegrationTest.java b/commercetools-models/src/test/java/io/sphere/sdk/products/commands/ProductCreateCommandIntegrationTest.java index 9e7562864e1..2c58a9e871e 100644 --- a/commercetools-models/src/test/java/io/sphere/sdk/products/commands/ProductCreateCommandIntegrationTest.java +++ b/commercetools-models/src/test/java/io/sphere/sdk/products/commands/ProductCreateCommandIntegrationTest.java @@ -20,6 +20,7 @@ import org.junit.BeforeClass; import org.junit.Test; +import java.time.Duration; import java.util.Arrays; import java.util.List; import java.util.Locale; @@ -139,7 +140,7 @@ public void createPublishedProduct() { assertThat(product.getMasterData().isPublished()).isTrue(); assertThat(product.getMasterData().getCurrent().getSlug()).isEqualTo(slug); - assertEventually(() -> { + assertEventually(Duration.ofSeconds(120), Duration.ofMillis(200), () -> { final ProductProjectionSearch search = ProductProjectionSearch.ofCurrent() .withQueryFilters(m -> m.id().is(product.getId())); final PagedSearchResult searchResult = client().executeBlocking(search); @@ -195,4 +196,4 @@ public void createProductByJsonDraft() throws Exception { private void unpublishAndDelete(final Product product) { client().executeBlocking(ProductDeleteCommand.of(client().executeBlocking(ProductUpdateCommand.of(product, Unpublish.of())))); } -} \ No newline at end of file +}