diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index cf96b75e6..ea36f1725 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -181,7 +181,8 @@ jobs: export PATH=../deps/nats-server:../deps/nats-streaming-server:$PATH export NATS_TEST_SERVER_VERSION="$(nats-server -v)" flags="" - ctest -L 'test' --timeout 60 --output-on-failure --repeat-until-fail ${{ inputs.repeat }} + ctest -R 'MicroServiceStopsWhenServerStops' --timeout 60 --output-on-failure --repeat-until-fail 20 # ${{ inputs.repeat }} + # ctest -L 'test' --timeout 60 --output-on-failure --repeat-until-fail ${{ inputs.repeat }} - name: Upload coverage reports to Codecov # PRs from external contributors fail: https://github.com/codecov/feedback/issues/301 diff --git a/test/test.c b/test/test.c index d2bd91666..9deb3c85c 100644 --- a/test/test.c +++ b/test/test.c @@ -34430,18 +34430,12 @@ void test_MicroServiceStopsWhenServerStops(void) test("Stop the server: "); testCond((_stopServer(serverPid), true)); - test("Wait for the service to stop: "); - natsMutex_Lock(arg.m); - while ((s != NATS_TIMEOUT) && !arg.microAllDone) - s = natsCondition_TimedWait(arg.c, arg.m, 1000); - natsMutex_Unlock(arg.m); - testCond(arg.microAllDone); + _waitForMicroservicesAllDone(&arg); test("Test microservice is not running: "); testCond(microService_IsStopped(m)) microService_Destroy(m); - _waitForMicroservicesAllDone(&arg); test("Destroy the test connection: "); natsConnection_Destroy(nc);