Skip to content

Commit

Permalink
Fix flaky tet in stateful stub
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshnikam671 committed Feb 14, 2025
1 parent bf2a8a6 commit 6c32ca1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ import io.specmatic.core.value.*
import io.specmatic.stub.ContractStub
import io.specmatic.stub.loadContractStubsFromImplicitPaths
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.fail
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.MethodOrderer
import org.junit.jupiter.api.Order
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestMethodOrder
import org.junit.jupiter.api.fail
import java.util.concurrent.CountDownLatch
import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit

@TestMethodOrder(MethodOrderer.OrderAnnotation::class)
class StatefulHttpStubTest {
Expand Down Expand Up @@ -659,6 +662,7 @@ class StatefulHttpStubConcurrencyTest {
}

latch.await()
executor.awaitTermination(10L, TimeUnit.SECONDS)
executor.shutdown()

// Verify all products were added
Expand Down

0 comments on commit 6c32ca1

Please sign in to comment.