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

Fixed NBO unit tests.

This commit is contained in:
Teemu Ollakka
2019-09-13 12:48:21 +03:00
parent e0f9550967
commit 64fda07e91
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Codership Oy <info@codership.com> * Copyright (C) 2018-2019 Codership Oy <info@codership.com>
* *
* This file is part of wsrep-lib. * This file is part of wsrep-lib.
* *

View File

@ -50,7 +50,7 @@ BOOST_FIXTURE_TEST_CASE(test_local_nbo,
BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_undefined); BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_undefined);
// Second phase replicates the NBO end event and grabs TOI // Second phase replicates the NBO end event and grabs TOI
// again for finalizing the NBO. // again for finalizing the NBO.
BOOST_REQUIRE(cc.begin_nbo_phase_two() == 0); BOOST_REQUIRE(cc.begin_nbo_phase_two(keys) == 0);
BOOST_REQUIRE(cc.mode() == wsrep::client_state::m_nbo); BOOST_REQUIRE(cc.mode() == wsrep::client_state::m_nbo);
BOOST_REQUIRE(cc.in_toi()); BOOST_REQUIRE(cc.in_toi());
BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_local); BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_local);
@ -126,7 +126,7 @@ BOOST_FIXTURE_TEST_CASE(test_applying_nbo,
key.append_key_part("k2", 2); key.append_key_part("k2", 2);
wsrep::key_array keys{key}; wsrep::key_array keys{key};
// Starting phase two should put nbo_cs in toi mode. // Starting phase two should put nbo_cs in toi mode.
BOOST_REQUIRE(nbo_cs->begin_nbo_phase_two() == 0); BOOST_REQUIRE(nbo_cs->begin_nbo_phase_two(keys) == 0);
BOOST_REQUIRE(nbo_cs->mode() == wsrep::client_state::m_nbo); BOOST_REQUIRE(nbo_cs->mode() == wsrep::client_state::m_nbo);
BOOST_REQUIRE(nbo_cs->in_toi()); BOOST_REQUIRE(nbo_cs->in_toi());
BOOST_REQUIRE(nbo_cs->toi_mode() == wsrep::client_state::m_local); BOOST_REQUIRE(nbo_cs->toi_mode() == wsrep::client_state::m_local);