Skip to content

Commit f5320c1

Browse files
fix: flaky test
1 parent 0e296e0 commit f5320c1

File tree

1 file changed

+6
-0
lines changed
  • src/integration-test/java/com/commercetools/sync/integration/ctpprojectsource/categories

1 file changed

+6
-0
lines changed

src/integration-test/java/com/commercetools/sync/integration/ctpprojectsource/categories/CategorySyncIT.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,12 @@ void syncDrafts_fromCategoriesWithoutKeys_ShouldNotUpdateCategories() {
479479
.custom(CategoryITUtils.getCustomFieldsDraft())
480480
.build();
481481

482+
// Ensure SOURCE is clean before creating categories (defensive cleanup)
483+
CategoryITUtils.deleteCategoriesBySlug(
484+
TestClientUtils.CTP_SOURCE_CLIENT,
485+
Locale.ENGLISH,
486+
List.of("furniture1-project-source", "furniture2-project-source"));
487+
482488
// Create two categories in the source with Keys.
483489
List<CompletableFuture<ApiHttpResponse<Category>>> futureCreations = new ArrayList<>();
484490
futureCreations.add(

0 commit comments

Comments
 (0)