1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-21 12:22:06 +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
parent 13442a04d8
commit 9bd26d49c5
11 changed files with 302 additions and 308 deletions

View File

@ -240,7 +240,7 @@ BOOST_FIXTURE_TEST_CASE(server_state_applying_1pc_rollback,
applying_server_fixture)
{
/* make sure default success result is flipped to error_fatal */
ss.provider().commit_order_leave_result_ = wsrep::provider::success;
ss.mock_provider().commit_order_leave_result_ = wsrep::provider::success;
hps.fail_next_applying_ = true;
char buf[1] = { 1 };
BOOST_REQUIRE(ss.on_apply(hps, ws_handle, ws_meta,
@ -255,7 +255,7 @@ BOOST_FIXTURE_TEST_CASE(server_state_applying_2pc_rollback,
applying_server_fixture)
{
/* make sure default success result is flipped to error_fatal */
ss.provider().commit_order_leave_result_ = wsrep::provider::success;
ss.mock_provider().commit_order_leave_result_ = wsrep::provider::success;
hps.do_2pc_ = true;
hps.fail_next_applying_ = true;
char buf[1] = { 1 };