Skip to content

Commit

Permalink
increase wait time for search index update
Browse files Browse the repository at this point in the history
  • Loading branch information
jenschude committed Dec 14, 2020
1 parent becf83e commit b48dcfb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<ProductProjection> searchResult = client().executeBlocking(search);
Expand Down Expand Up @@ -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()))));
}
}
}

0 comments on commit b48dcfb

Please sign in to comment.