You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-15 12:09:09 +03:00
Added to the unit test
Effectively this is just a test of Config, to make sure it's doing envvar substitutions & number suffix expansions right.
This commit is contained in:
@@ -30,6 +30,7 @@ Cache::Cache()
|
|||||||
syslog(LOG_CRIT, "Cache/cache_size is not a number");
|
syslog(LOG_CRIT, "Cache/cache_size is not a number");
|
||||||
throw runtime_error("Please set Cache/cache_size to a number");
|
throw runtime_error("Please set Cache/cache_size to a number");
|
||||||
}
|
}
|
||||||
|
cout << "Cache got cache size " << maxCacheSize << endl;
|
||||||
|
|
||||||
prefix = conf->getValue("Cache", "path");
|
prefix = conf->getValue("Cache", "path");
|
||||||
if (prefix.empty())
|
if (prefix.empty())
|
||||||
@@ -46,6 +47,8 @@ Cache::Cache()
|
|||||||
syslog(LOG_CRIT, "Failed to create %s, got: %s", prefix.string().c_str(), e.what());
|
syslog(LOG_CRIT, "Failed to create %s, got: %s", prefix.string().c_str(), e.what());
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
cout << "Cache got prefix " << prefix << endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache::~Cache()
|
Cache::~Cache()
|
||||||
|
|||||||
@@ -8,6 +8,10 @@
|
|||||||
#include "PingTask.h"
|
#include "PingTask.h"
|
||||||
#include "CopyTask.h"
|
#include "CopyTask.h"
|
||||||
#include "messageFormat.h"
|
#include "messageFormat.h"
|
||||||
|
#include "Config.h"
|
||||||
|
#include "Cache.h"
|
||||||
|
#include "LocalStorage.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -470,5 +474,13 @@ int main()
|
|||||||
listdirtask();
|
listdirtask();
|
||||||
pingtask();
|
pingtask();
|
||||||
copytask();
|
copytask();
|
||||||
|
|
||||||
|
Config *conf = Config::get();
|
||||||
|
LocalStorage ls;
|
||||||
|
Cache cache;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user