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

codership/wsrep-lib#34 Unit tests for initialization errors

Unit test for server initialization state errors.
This commit is contained in:
Teemu Ollakka
2018-12-20 14:51:13 +02:00
parent e9bb552096
commit ba02e7525b
2 changed files with 43 additions and 6 deletions

View File

@ -172,9 +172,14 @@ namespace wsrep
{
switch (sync_point_action_)
{
case spa_none:
break;
case spa_initialize:
server_state_.initialized();
break;
case spa_initialize_error:
throw wsrep::runtime_error("Inject initialization error");
break;
}
}
}
@ -182,7 +187,10 @@ namespace wsrep
std::string sync_point_enabled_;
enum sync_point_action
{
spa_initialize
spa_none,
spa_initialize,
spa_initialize_error
} sync_point_action_;
bool sst_before_init_;