mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-02 05:22:26 +03:00
Tests for transaction context, server context state strings.
This commit is contained in:
@ -83,3 +83,27 @@ BOOST_FIXTURE_TEST_CASE(server_context_applying_2pc_rollback,
|
||||
const wsrep::transaction_context& txc(cc.transaction());
|
||||
BOOST_REQUIRE(txc.state() == wsrep::transaction_context::s_aborted);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(server_context_state_strings)
|
||||
{
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_disconnected) == "disconnected");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_initializing) == "initilizing");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_initialized) == "initilized");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_connected) == "connected");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_joiner) == "joiner");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_joined) == "joined");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_donor) == "donor");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_synced) == "synced");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
wsrep::server_context::s_disconnecting) == "disconnecting");
|
||||
BOOST_REQUIRE(wsrep::to_string(
|
||||
static_cast<enum wsrep::server_context::state>(0xff)) == "unknown");
|
||||
}
|
||||
|
Reference in New Issue
Block a user