Skip to content

Commit

Permalink
Improve shutdown of test
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerkaraszewski committed Dec 2, 2024
1 parent 164a5db commit f32265f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/clustertest/tests/ForkedNodeApprovalTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,10 @@ struct ForkedNodeApprovalTest : tpunit::TestFixture {
// Ok, now we can start the second follower back up and secondary leader should be able to lead.
tester.getTester(2).startServer(false);
ASSERT_TRUE(tester.getTester(1).waitForState("LEADING"));

// We call stopServer on the forked leader because it crashed, but the cluster tester doesn't realize, so shutting down
// normally will time out after a minute. Calling `stopServer` explicitly will clear the server PID, and we won't need
// to wait for this timeout.
tester.getTester(0).stopServer();
}
} __ForkedNodeApprovalTest;

0 comments on commit f32265f

Please sign in to comment.