1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-08-05 04:01:12 +03:00
This commit is contained in:
Teemu Ollakka
2019-06-06 15:50:58 +03:00
parent 946eb4121d
commit ef448e2f63
3 changed files with 12 additions and 7 deletions

View File

@@ -137,8 +137,12 @@ namespace
cc.open(cc.id());
BOOST_REQUIRE(cc.before_command() == 0);
BOOST_REQUIRE(cc.before_statement() == 0);
wsrep::ws_handle ws_handle(wsrep::transaction_id(1), (void*)1);
wsrep::ws_meta ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(1)),
}
void start_transaction(wsrep::transaction_id id,
wsrep::seqno seqno)
{
wsrep::ws_handle ws_handle(id, (void*)1);
wsrep::ws_meta ws_meta(wsrep::gtid(wsrep::id("1"), seqno),
wsrep::stid(sc.id(),
wsrep::transaction_id(1),
cc.id()),
@@ -150,6 +154,7 @@ namespace
BOOST_REQUIRE(tc.certified() == true);
BOOST_REQUIRE(tc.ordered() == true);
}
wsrep::mock_server_service server_service;
wsrep::mock_server_state sc;
wsrep::mock_client cc;

View File

@@ -66,3 +66,8 @@ BOOST_FIXTURE_TEST_CASE(test_local_nbo,
BOOST_REQUIRE(sc.provider().toi_start_transaction() == 1);
BOOST_REQUIRE(sc.provider().toi_commit() == 1);
}
BOOST_FIXTURE_TEST_CASE(test_applying_nbo,
applying_client_fixture)
{
}

View File

@@ -50,11 +50,6 @@ BOOST_FIXTURE_TEST_CASE(test_toi_mode,
BOOST_FIXTURE_TEST_CASE(test_toi_applying,
applying_client_fixture)
{
// Fixture opens a transaction, commit it first
BOOST_REQUIRE((cc.before_commit() || cc.ordered_commit() ||
cc.after_commit()) == 0);
cc.after_applying();
BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_local);
wsrep::ws_meta ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(2)),
wsrep::stid(sc.id(),