diff --git a/test/client_state_fixture.hpp b/test/client_state_fixture.hpp index 4ea2309..6073d25 100644 --- a/test/client_state_fixture.hpp +++ b/test/client_state_fixture.hpp @@ -203,6 +203,7 @@ namespace BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing); cc.enable_streaming(wsrep::streaming_context::row, 1); } + wsrep::mock_server_service server_service; wsrep::mock_server_state sc; wsrep::mock_client cc; diff --git a/test/mock_server_state.hpp b/test/mock_server_state.hpp index a9b14c1..7392d08 100644 --- a/test/mock_server_state.hpp +++ b/test/mock_server_state.hpp @@ -115,8 +115,9 @@ namespace wsrep WSREP_OVERRIDE { mock_high_priority_service* mhps( - reinterpret_cast(high_priority_service)); - wsrep::client_state* cs(mhps->client_state()); + static_cast(high_priority_service)); + wsrep::mock_client* cs(static_cast( + mhps->client_state())); cs->after_command_before_result(); cs->after_command_after_result(); cs->close(); diff --git a/test/transaction_test.cpp b/test/transaction_test.cpp index 46ec414..3b78e7d 100644 --- a/test/transaction_test.cpp +++ b/test/transaction_test.cpp @@ -1067,6 +1067,15 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_rollback, BOOST_REQUIRE(sc.provider().fragments() == 2); BOOST_REQUIRE(sc.provider().start_fragments() == 1); BOOST_REQUIRE(sc.provider().rollback_fragments() == 1); + + wsrep::high_priority_service* hps( + sc.find_streaming_applier( + sc.id(), wsrep::transaction_id(1))); + BOOST_REQUIRE(hps); + hps->rollback(wsrep::ws_handle(), wsrep::ws_meta()); + hps->after_apply(); + sc.stop_streaming_applier(sc.id(), wsrep::transaction_id(1)); + server_service.release_high_priority_service(hps); } // @@ -1087,6 +1096,15 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_cert_fail_non_commit, BOOST_REQUIRE(sc.provider().fragments() == 2); BOOST_REQUIRE(sc.provider().start_fragments() == 1); BOOST_REQUIRE(sc.provider().rollback_fragments() == 1); + + wsrep::high_priority_service* hps( + sc.find_streaming_applier( + sc.id(), wsrep::transaction_id(1))); + BOOST_REQUIRE(hps); + hps->rollback(wsrep::ws_handle(), wsrep::ws_meta()); + hps->after_apply(); + sc.stop_streaming_applier(sc.id(), wsrep::transaction_id(1)); + server_service.release_high_priority_service(hps); } // @@ -1109,6 +1127,15 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_cert_fail_commit, BOOST_REQUIRE(sc.provider().fragments() == 2); BOOST_REQUIRE(sc.provider().start_fragments() == 1); BOOST_REQUIRE(sc.provider().rollback_fragments() == 1); + + wsrep::high_priority_service* hps( + sc.find_streaming_applier( + sc.id(), wsrep::transaction_id(1))); + BOOST_REQUIRE(hps); + hps->rollback(wsrep::ws_handle(), wsrep::ws_meta()); + hps->after_apply(); + sc.stop_streaming_applier(sc.id(), wsrep::transaction_id(1)); + server_service.release_high_priority_service(hps); } // @@ -1243,6 +1270,15 @@ BOOST_FIXTURE_TEST_CASE(transaction_statement_streaming_cert_fail, BOOST_REQUIRE(sc.provider().fragments() == 1); BOOST_REQUIRE(sc.provider().start_fragments() == 0); BOOST_REQUIRE(sc.provider().rollback_fragments() == 1); + + wsrep::high_priority_service* hps( + sc.find_streaming_applier( + sc.id(), wsrep::transaction_id(1))); + BOOST_REQUIRE(hps); + hps->rollback(wsrep::ws_handle(), wsrep::ws_meta()); + hps->after_apply(); + sc.stop_streaming_applier(sc.id(), wsrep::transaction_id(1)); + server_service.release_high_priority_service(hps); } ///////////////////////////////////////////////////////////////////////////////