1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-06-30 18:01:53 +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

@ -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,