Skip to content

Commit

Permalink
Merge pull request #425 from commercetools/424-Increase-product-types…
Browse files Browse the repository at this point in the history
…-benchmarks-threshold

424: Temporarily increase product types benchmarks threshold
  • Loading branch information
heshamMassoud authored Aug 8, 2019
2 parents afbe1dd + 35a2d9d commit 940425f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void sync_NewProductTypes_ShouldCreateProductTypes() throws IOException {
final ProductTypeSyncStatistics syncStatistics = executeBlocking(productTypeSync.sync(productTypeDrafts));
final long totalTime = System.currentTimeMillis() - beforeSyncTime;

// assert on threshold (based on history of benchmarks; highest was ~12 seconds)
final int threshold = 24000; // double of the highest benchmark
// assert on threshold (based on history of benchmarks; highest was ~43 seconds)
final int threshold = 43000; // double of the highest benchmark
assertThat(totalTime).withFailMessage(format(THRESHOLD_EXCEEDED_ERROR, totalTime, threshold))
.isLessThan(threshold);

Expand Down Expand Up @@ -138,8 +138,8 @@ void sync_ExistingProductTypes_ShouldUpdateProductTypes() throws IOException {
final ProductTypeSyncStatistics syncStatistics = executeBlocking(productTypeSync.sync(productTypeDrafts));
final long totalTime = System.currentTimeMillis() - beforeSyncTime;

// assert on threshold (based on history of benchmarks; highest was ~13 seconds)
final int threshold = 26000; // double of the highest benchmark
// assert on threshold (based on history of benchmarks; highest was ~43 seconds)
final int threshold = 43000; // double of the highest benchmark
assertThat(totalTime).withFailMessage(format(THRESHOLD_EXCEEDED_ERROR, totalTime, threshold))
.isLessThan(threshold);

Expand Down Expand Up @@ -198,8 +198,8 @@ void sync_WithSomeExistingProductTypes_ShouldSyncProductTypes() throws IOExcepti
final ProductTypeSyncStatistics syncStatistics = executeBlocking(productTypeSync.sync(productTypeDrafts));
final long totalTime = System.currentTimeMillis() - beforeSyncTime;

// assert on threshold (based on history of benchmarks; highest was ~13 seconds)
final int threshold = 26000; // double of the highest benchmark
// assert on threshold (based on history of benchmarks; highest was ~43 seconds)
final int threshold = 43000; // double of the highest benchmark
assertThat(totalTime).withFailMessage(format(THRESHOLD_EXCEEDED_ERROR, totalTime, threshold))
.isLessThan(threshold);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import static com.commercetools.sync.products.ProductSyncMockUtils.PRODUCT_TYPE_RESOURCE_PATH;
import static com.commercetools.tests.utils.CompletionStageUtil.executeBlocking;
import static io.sphere.sdk.json.SphereJsonUtils.readObjectFromResource;
import static org.assertj.core.api.Java6Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;

class BuildProductVariantImageUpdateActionsIT {
private static final String DRAFTS_ROOT = "com/commercetools/sync/integration/externalsource/products/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.HashSet;
import java.util.List;

import static org.assertj.core.api.Java6Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;

class CategoryReferencePairTest {

Expand Down

0 comments on commit 940425f

Please sign in to comment.