1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-14 04:40:59 +03:00

Introduce set_provider_factory() method for server_state

This allows injecting an application allocated provider into
server_state.

After this virtual provider getter is unnecessary. Made the getter
normal method and fixed unit tests accordingly.
This commit is contained in:
Denis Protivensky
2021-12-14 20:28:56 +03:00
committed by Teemu Ollakka
parent 940ba9bd0e
commit 6df17812d9
11 changed files with 302 additions and 308 deletions

View File

@ -41,9 +41,9 @@ BOOST_FIXTURE_TEST_CASE(test_toi_mode,
BOOST_REQUIRE(cc.leave_toi_local(err) == 0);
BOOST_REQUIRE(cc.mode() == wsrep::client_state::m_local);
BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_undefined);
BOOST_REQUIRE(sc.provider().toi_write_sets() == 1);
BOOST_REQUIRE(sc.provider().toi_start_transaction() == 1);
BOOST_REQUIRE(sc.provider().toi_commit() == 1);
BOOST_REQUIRE(sc.mock_provider().toi_write_sets() == 1);
BOOST_REQUIRE(sc.mock_provider().toi_start_transaction() == 1);
BOOST_REQUIRE(sc.mock_provider().toi_commit() == 1);
}
BOOST_FIXTURE_TEST_CASE(test_toi_applying,