Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
levb committed Sep 25, 2024
1 parent 3de6a67 commit 3991b51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3991b51

Please sign in to comment.