From ef448e2f63d3b09522e136cd00264ebd493610c9 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Thu, 6 Jun 2019 15:50:58 +0300 Subject: [PATCH] save --- test/client_state_fixture.hpp | 9 +++++++-- test/nbo_test.cpp | 5 +++++ test/toi_test.cpp | 5 ----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/test/client_state_fixture.hpp b/test/client_state_fixture.hpp index 966dead..63b946f 100644 --- a/test/client_state_fixture.hpp +++ b/test/client_state_fixture.hpp @@ -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; diff --git a/test/nbo_test.cpp b/test/nbo_test.cpp index c735651..66aa49b 100644 --- a/test/nbo_test.cpp +++ b/test/nbo_test.cpp @@ -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) +{ +} diff --git a/test/toi_test.cpp b/test/toi_test.cpp index c0df5ec..10b3662 100644 --- a/test/toi_test.cpp +++ b/test/toi_test.cpp @@ -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(),