All unit tests compile, but crash. This is the most horrifying commit I've ever made.

This commit is contained in:
Pavel Kirienko
2015-07-01 14:55:24 +03:00
parent feb7600f17
commit 8a2e22046e
42 changed files with 421 additions and 587 deletions
@@ -207,7 +207,7 @@ public:
* storage backend using key 'cluster_size'.
* Returns negative error code.
*/
int init(uint8_t init_cluster_size = ClusterSizeUnknown)
int init(const uint8_t init_cluster_size, const TransferPriority priority)
{
/*
* Figuring out the cluster size
@@ -263,7 +263,7 @@ public:
{
return res;
}
(void)discovery_pub_.setPriority(TransferPriorityLow);
discovery_pub_.setPriority(priority);
res = discovery_sub_.start(DiscoveryCallback(this, &ClusterManager::handleDiscovery));
if (res < 0)
@@ -727,7 +727,7 @@ public:
* value from the persistent storage will be used. If not set and there's no such key
* in the persistent storage, initialization will fail.
*/
int init(uint8_t cluster_size = ClusterManager::ClusterSizeUnknown)
int init(const uint8_t cluster_size, const TransferPriority priority)
{
/*
* Initializing state variables
@@ -748,7 +748,7 @@ public:
return res;
}
res = cluster_.init(cluster_size);
res = cluster_.init(cluster_size, priority);
if (res < 0)
{
return res;
@@ -246,12 +246,14 @@ public:
, node_discoverer_(node, tracer, *this)
{ }
int init(const UniqueID& own_unique_id, const uint8_t cluster_size = ClusterManager::ClusterSizeUnknown)
int init(const UniqueID& own_unique_id,
const uint8_t cluster_size = ClusterManager::ClusterSizeUnknown,
const TransferPriority priority = TransferPriority::OneHigherThanLowest)
{
/*
* Initializing Raft core first, because the next step requires Log to be loaded
*/
int res = raft_core_.init(cluster_size);
int res = raft_core_.init(cluster_size, priority);
if (res < 0)
{
return res;
@@ -276,13 +278,13 @@ public:
/*
* Misc
*/
res = allocation_request_manager_.init();
res = allocation_request_manager_.init(priority);
if (res < 0)
{
return res;
}
res = node_discoverer_.init();
res = node_discoverer_.init(priority);
if (res < 0)
{
return res;