mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-21 12:22:06 +03:00
Handle disconnecting state in on_sync()
When disconnecting from the group, the sync event from the provider must not change the state back to synced.
This commit is contained in:
@ -935,3 +935,14 @@ BOOST_FIXTURE_TEST_CASE(server_state_xa_not_orphaned,
|
||||
BOOST_REQUIRE(not ss.find_streaming_applier(
|
||||
meta_commit_s3.server_id(), meta_commit_s3.transaction_id()));
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(server_state_sync_in_disconnecting,
|
||||
sst_first_server_fixture)
|
||||
{
|
||||
bootstrap();
|
||||
ss.disconnect();
|
||||
BOOST_REQUIRE(ss.state() == wsrep::server_state::s_disconnecting);
|
||||
// Synced event from the provider must not change the state.
|
||||
ss.on_sync();
|
||||
BOOST_REQUIRE(ss.state() == wsrep::server_state::s_disconnecting);
|
||||
}
|
||||
|
Reference in New Issue
Block a user