|
@ -52,34 +52,33 @@ int main( |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
size_t utest_size = 4096; |
|
|
|
|
|
|
|
|
size_t db_port = 20450; |
|
|
|
|
|
|
|
|
if(cmd_args.isFlagSet("-utest-count")) |
|
|
|
|
|
|
|
|
if(cmd_args.isFlagSet("-port")) |
|
|
{ |
|
|
{ |
|
|
try{ |
|
|
try{ |
|
|
utest_size = std::stoll(cmd_args.getFlagValue("-utest-count")); |
|
|
|
|
|
|
|
|
db_port = std::stoi(cmd_args.getFlagValue("-port")); |
|
|
|
|
|
if(db_port>std::numeric_limits<uint16_t>::max()) throw std::runtime_error("invalid_port"); |
|
|
} catch (...) { |
|
|
} catch (...) { |
|
|
std::cerr << "Invalid utest-count value" << std::endl; |
|
|
|
|
|
|
|
|
std::cerr << "Invalid port value" << std::endl; |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
size_t db_port = 20450; |
|
|
|
|
|
|
|
|
#ifdef UNITTEST
|
|
|
|
|
|
size_t utest_size = 4096; |
|
|
|
|
|
|
|
|
if(cmd_args.isFlagSet("-port")) |
|
|
|
|
|
|
|
|
if(cmd_args.isFlagSet("-utest-count")) |
|
|
{ |
|
|
{ |
|
|
try{ |
|
|
try{ |
|
|
db_port = std::stoi(cmd_args.getFlagValue("-port")); |
|
|
|
|
|
if(db_port>std::numeric_limits<uint16_t>::max()) throw std::runtime_error("invalid_port"); |
|
|
|
|
|
|
|
|
utest_size = std::stoll(cmd_args.getFlagValue("-utest-count")); |
|
|
} catch (...) { |
|
|
} catch (...) { |
|
|
std::cerr << "Invalid port value" << std::endl; |
|
|
|
|
|
|
|
|
std::cerr << "Invalid utest-count value" << std::endl; |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#ifdef UNITTEST
|
|
|
|
|
|
{ |
|
|
{ |
|
|
database db(database::create(utest_str, utest_size*2)); |
|
|
database db(database::create(utest_str, utest_size*2)); |
|
|
|
|
|
|
|
|