1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-30 07:23:07 +03:00

Made client_id, transaction_id constructors explicit.

This commit is contained in:
Teemu Ollakka
2018-07-11 15:00:31 +03:00
parent d564a6f154
commit ddc6c6495b
13 changed files with 102 additions and 84 deletions

View File

@ -108,9 +108,11 @@ namespace
cc.open(cc.id());
BOOST_REQUIRE(cc.before_command() == 0);
BOOST_REQUIRE(cc.before_statement() == 0);
wsrep::ws_handle ws_handle(1, (void*)1);
wsrep::ws_handle ws_handle(wsrep::transaction_id(1), (void*)1);
wsrep::ws_meta ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(1)),
wsrep::stid(sc.id(), 1, cc.id()),
wsrep::stid(sc.id(),
wsrep::transaction_id(1),
cc.id()),
wsrep::seqno(0),
wsrep::provider::flag::start_transaction |
wsrep::provider::flag::commit);
@ -138,9 +140,11 @@ namespace
cc.do_2pc_ = true;
BOOST_REQUIRE(cc.before_command() == 0);
BOOST_REQUIRE(cc.before_statement() == 0);
wsrep::ws_handle ws_handle(1, (void*)1);
wsrep::ws_handle ws_handle(wsrep::transaction_id(1), (void*)1);
wsrep::ws_meta ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(1)),
wsrep::stid(sc.id(), 1, cc.id()),
wsrep::stid(sc.id(),
wsrep::transaction_id(1),
cc.id()),
wsrep::seqno(0),
wsrep::provider::flag::start_transaction |
wsrep::provider::flag::commit);

View File

@ -41,7 +41,8 @@ namespace wsrep
wsrep::storage_service* storage_service(wsrep::client_service&)
{
return new wsrep::mock_storage_service(*this, ++last_client_id_);
return new wsrep::mock_storage_service(*this,
wsrep::client_id(++last_client_id_));
}
void release_storage_service(wsrep::storage_service* storage_service)
@ -52,7 +53,8 @@ namespace wsrep
wsrep::client_state* local_client_state()
{
wsrep::client_state* ret(new wsrep::mock_client(
*this, ++last_client_id_,
*this,
wsrep::client_id(++last_client_id_),
wsrep::client_state::m_local));
ret->open(ret->id());
return ret;
@ -67,7 +69,8 @@ namespace wsrep
wsrep::client_service&)
{
wsrep::mock_client* cs(new wsrep::mock_client(
*this, ++last_client_id_,
*this,
wsrep::client_id(++last_client_id_),
wsrep::client_state::m_high_priority));
wsrep::mock_high_priority_service* ret(
new wsrep::mock_high_priority_service(*this, cs, false));
@ -80,7 +83,8 @@ namespace wsrep
wsrep::high_priority_service&)
{
wsrep::mock_client* cs(new wsrep::mock_client(
*this, ++last_client_id_,
*this,
wsrep::client_id(++last_client_id_),
wsrep::client_state::m_high_priority));
wsrep::mock_high_priority_service* ret(
new wsrep::mock_high_priority_service(*this, cs, false));

View File

@ -17,9 +17,10 @@ namespace
wsrep::client_id(1),
wsrep::client_state::m_high_priority)
, hps(ss, &cc, false)
, ws_handle(1, (void*)1)
, ws_handle(wsrep::transaction_id(1), (void*)1)
, ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(1)),
wsrep::stid(wsrep::id("1"), 1, 1),
wsrep::stid(wsrep::id("1"), wsrep::transaction_id(1),
wsrep::client_id(1)),
wsrep::seqno(0),
wsrep::provider::flag::start_transaction |
wsrep::provider::flag::commit)
@ -114,9 +115,11 @@ BOOST_AUTO_TEST_CASE(server_state_streaming)
wsrep::client_state::m_high_priority);
cc.debug_log_level(1);
wsrep::mock_high_priority_service hps(ss, &cc, false);
wsrep::ws_handle ws_handle(1, (void*)1);
wsrep::ws_handle ws_handle(wsrep::transaction_id(1), (void*)1);
wsrep::ws_meta ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(1)),
wsrep::stid(wsrep::id("1"), 1, 1),
wsrep::stid(wsrep::id("1"),
wsrep::transaction_id(1),
wsrep::client_id(1)),
wsrep::seqno(0),
wsrep::provider::flag::start_transaction);
cc.open(cc.id());
@ -126,13 +129,17 @@ BOOST_AUTO_TEST_CASE(server_state_streaming)
BOOST_REQUIRE(ss.find_streaming_applier(
ws_meta.server_id(), ws_meta.transaction_id()));
ws_meta = wsrep::ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(2)),
wsrep::stid(wsrep::id("1"), 1, 1),
wsrep::stid(wsrep::id("1"),
wsrep::transaction_id(1),
wsrep::client_id(1)),
wsrep::seqno(1),
0);
BOOST_REQUIRE(ss.on_apply(hps, ws_handle, ws_meta,
wsrep::const_buffer("1", 1)) == 0);
ws_meta = wsrep::ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(2)),
wsrep::stid(wsrep::id("1"), 1, 1),
wsrep::stid(wsrep::id("1"),
wsrep::transaction_id(1),
wsrep::client_id(1)),
wsrep::seqno(1),
wsrep::provider::flag::commit);
BOOST_REQUIRE(ss.on_apply(hps, ws_handle, ws_meta,

View File

@ -21,7 +21,7 @@ namespace
BOOST_FIXTURE_TEST_CASE(transaction_append_key_data,
replicating_client_fixture_sync_rm)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
int vals[3] = {1, 2, 3};
wsrep::key key(wsrep::key::exclusive);
@ -46,7 +46,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(transaction_1pc, T,
wsrep::mock_client& cc(T::cc);
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -89,7 +89,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(transaction_rollback, T,
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -121,7 +121,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -163,7 +163,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -202,7 +202,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -240,7 +240,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -279,7 +279,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -315,7 +315,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_bf_before_cert_result_replay_success,
replicating_client_fixture_sync_rm)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
sc.provider().certify_result_ = wsrep::provider::error_bf_abort;
sc.provider().replay_result_ = wsrep::provider::success;
@ -335,7 +335,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_bf_before_cert_result_replay_cert_fail,
replicating_client_fixture_sync_rm)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
sc.provider().certify_result_ = wsrep::provider::error_bf_abort;
sc.provider().replay_result_ = wsrep::provider::error_certification_failed;
@ -361,7 +361,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -403,7 +403,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
wsrep::mock_client& cc(T::cc);
const wsrep::transaction& tc(T::tc);
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -437,7 +437,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -478,7 +478,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -519,7 +519,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -560,7 +560,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -601,7 +601,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -642,7 +642,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -684,7 +684,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -725,7 +725,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -766,7 +766,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -798,7 +798,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
const wsrep::transaction& tc(T::tc);
// Start a new transaction with ID 1
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -819,7 +819,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
wsrep::client_state& cc(T::cc);
const wsrep::transaction& tc(T::tc);
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
cc.after_statement();
BOOST_REQUIRE(cc.state() == wsrep::client_state::s_exec);
@ -842,7 +842,7 @@ BOOST_FIXTURE_TEST_CASE(
replicating_client_fixture_autocommit)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
wsrep_test::bf_abort_unordered(cc);
BOOST_REQUIRE(cc.before_commit());
@ -862,7 +862,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
wsrep::client_state& cc(T::cc);
const wsrep::transaction& tc(T::tc);
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
cc.after_statement();
BOOST_REQUIRE(cc.state() == wsrep::client_state::s_exec);
@ -895,7 +895,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_1pc_bf_abort_after_after_command_after_result_sync_rm,
replicating_client_fixture_sync_rm)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
cc.after_statement();
BOOST_REQUIRE(cc.state() == wsrep::client_state::s_exec);
@ -920,7 +920,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_1pc_bf_abort_after_after_command_after_result_async_rm,
replicating_client_fixture_async_rm)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
cc.after_statement();
BOOST_REQUIRE(cc.state() == wsrep::client_state::s_exec);
@ -980,7 +980,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_applying_rollback,
BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_1pc_commit,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
BOOST_REQUIRE(cc.before_commit() == 0);
@ -1000,7 +1000,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_batch_streaming_1pc_commit,
{
BOOST_REQUIRE(cc.enable_streaming(
wsrep::streaming_context::row, 2) == 0);
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 0);
BOOST_REQUIRE(cc.after_row() == 0);
@ -1021,7 +1021,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_row_streaming_1pc_commit_two_statements,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
BOOST_REQUIRE(cc.after_statement() == 0);
@ -1043,7 +1043,7 @@ BOOST_FIXTURE_TEST_CASE(
BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_rollback,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
BOOST_REQUIRE(cc.before_rollback() == 0);
@ -1060,7 +1060,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_rollback,
BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_cert_fail_non_commit,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
sc.provider().certify_result_ = wsrep::provider::error_certification_failed;
@ -1080,7 +1080,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_cert_fail_non_commit,
BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_cert_fail_commit,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
sc.provider().certify_result_ = wsrep::provider::error_certification_failed;
@ -1102,7 +1102,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_cert_fail_commit,
BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_bf_abort_committing,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
BOOST_REQUIRE(cc.before_commit() == 0);
@ -1124,7 +1124,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_bf_abort_committing,
BOOST_FIXTURE_TEST_CASE(transaction_byte_streaming_1pc_commit,
streaming_client_fixture_byte)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
cc.bytes_generated_ = 1;
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
@ -1143,7 +1143,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_byte_batch_streaming_1pc_commit,
BOOST_REQUIRE(
cc.enable_streaming(
wsrep::streaming_context::bytes, 2) == 0);
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
cc.bytes_generated_ = 1;
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 0);
@ -1166,7 +1166,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_statement_streaming_1pc_commit,
BOOST_REQUIRE(
cc.enable_streaming(
wsrep::streaming_context::statement, 1) == 0);
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 0);
BOOST_REQUIRE(cc.after_statement() == 0);
@ -1187,7 +1187,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_statement_batch_streaming_1pc_commit,
BOOST_REQUIRE(
cc.enable_streaming(
wsrep::streaming_context::statement, 2) == 0);
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 0);
BOOST_REQUIRE(cc.after_statement() == 0);
@ -1213,7 +1213,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_statement_streaming_cert_fail,
BOOST_REQUIRE(
cc.enable_streaming(
wsrep::streaming_context::statement, 1) == 0);
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 0);
sc.provider().certify_result_ = wsrep::provider::error_certification_failed;

View File

@ -10,7 +10,7 @@
BOOST_FIXTURE_TEST_CASE(transaction_2pc,
replicating_client_fixture_2pc)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -38,7 +38,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_2pc_bf_before_before_prepare,
replicating_client_fixture_2pc)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -65,7 +65,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_2pc_bf_before_after_prepare,
replicating_client_fixture_2pc)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -95,7 +95,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_2pc_bf_after_after_prepare,
replicating_client_fixture_2pc)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -123,7 +123,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_2pc_bf_before_before_commit,
replicating_client_fixture_2pc)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -156,7 +156,7 @@ BOOST_FIXTURE_TEST_CASE(
transaction_2pc_bf_during_commit_order_enter,
replicating_client_fixture_2pc)
{
cc.start_transaction(1);
cc.start_transaction(wsrep::transaction_id(1));
BOOST_REQUIRE(tc.active());
BOOST_REQUIRE(tc.id() == wsrep::transaction_id(1));
BOOST_REQUIRE(tc.state() == wsrep::transaction::s_executing);
@ -187,7 +187,7 @@ BOOST_FIXTURE_TEST_CASE(
BOOST_FIXTURE_TEST_CASE(transaction_streaming_2pc_commit,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
BOOST_REQUIRE(cc.before_prepare() == 0);
@ -204,7 +204,7 @@ BOOST_FIXTURE_TEST_CASE(transaction_streaming_2pc_commit,
BOOST_FIXTURE_TEST_CASE(transaction_streaming_2pc_commit_two_statements,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(1) == 0);
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
BOOST_REQUIRE(cc.after_statement() == 0);