Skip to content

Commit 2962e35

Browse files
fix: spotlesscheck it
1 parent 59d8583 commit 2962e35

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/integration-test/java/com/commercetools/sync/integration/services/impl/ProductTypeServiceImplIT.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,12 @@ void updateProductType_WithValidChanges_ShouldUpdateProductTypeCorrectly() {
516516
futures.add(future);
517517
}
518518

519-
readyLatch.await(5, java.util.concurrent.TimeUnit.SECONDS);
520-
519+
final boolean allThreadsReady =
520+
readyLatch.await(5, java.util.concurrent.TimeUnit.SECONDS);
521+
assertThat(allThreadsReady)
522+
.as("All threads should be ready within timeout")
523+
.isTrue();
524+
521525
// Start all threads at once
522526
startLatch.countDown();
523527

@@ -527,7 +531,11 @@ void updateProductType_WithValidChanges_ShouldUpdateProductTypeCorrectly() {
527531
.join();
528532

529533
executorService.shutdown();
530-
executorService.awaitTermination(10, java.util.concurrent.TimeUnit.SECONDS);
534+
final boolean executorTerminated =
535+
executorService.awaitTermination(10, java.util.concurrent.TimeUnit.SECONDS);
536+
assertThat(executorTerminated)
537+
.as("Executor service should terminate within timeout")
538+
.isTrue();
531539

532540
// assertions - all calls should return the same result
533541
final Optional<Map<String, AttributeMetaData>> firstResult = futures.get(0).join();

0 commit comments

Comments
 (0)