From: Marcin Siodelski Date: Wed, 15 Oct 2014 09:29:25 +0000 (+0200) Subject: [3615] Applied patches attached to tickets #3615 and #3617. X-Git-Tag: trac3162a_base~6^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73bafb1ffbd8d75d91b018b5de4c643334a0e56a;p=thirdparty%2Fkea.git [3615] Applied patches attached to tickets #3615 and #3617. The former replaces the -v with the -d parameter in D2 unit tests. This enables the D2 tests that were skipped when the -v parameter was in use. The -v causes D2 to print version number and exits. The other patch is for printing configuration summary in D2 which we were not aware was failing because tests used to be skipped with -v parameter. --- diff --git a/src/bin/d2/tests/d2_cfg_mgr_unittests.cc b/src/bin/d2/tests/d2_cfg_mgr_unittests.cc index 3abdbd6cec..d5026a043a 100644 --- a/src/bin/d2/tests/d2_cfg_mgr_unittests.cc +++ b/src/bin/d2/tests/d2_cfg_mgr_unittests.cc @@ -378,7 +378,7 @@ TEST_F(D2CfgMgrTest, validParamsEntry) { d2_params_->getIpAddress()); // Verify the configuration summary. - EXPECT_EQ("listening on 3001::5, port 777", + EXPECT_EQ("listening on 3001::5, port 777, using UDP", d2_params_->getConfigSummary()); } diff --git a/src/bin/d2/tests/d2_controller_unittests.cc b/src/bin/d2/tests/d2_controller_unittests.cc index 4ffc918d23..a43a0953d1 100644 --- a/src/bin/d2/tests/d2_controller_unittests.cc +++ b/src/bin/d2/tests/d2_controller_unittests.cc @@ -122,7 +122,7 @@ TEST_F(D2ControllerTest, commandLineArgs) { char* argv[] = { const_cast("progName"), const_cast("-c"), const_cast(DControllerTest::CFG_TEST_FILE), - const_cast("-v") }; + const_cast("-d") }; int argc = 4; // Verify that verbose flag is false initially. diff --git a/src/bin/d2/tests/d_controller_unittests.cc b/src/bin/d2/tests/d_controller_unittests.cc index 07e47b9a90..c10d636104 100644 --- a/src/bin/d2/tests/d_controller_unittests.cc +++ b/src/bin/d2/tests/d_controller_unittests.cc @@ -87,7 +87,7 @@ TEST_F(DStubControllerTest, commandLineArgs) { char* argv[] = { const_cast("progName"), const_cast("-c"), const_cast("cfgName"), - const_cast("-v") }; + const_cast("-d") }; int argc = 4; EXPECT_NO_THROW(parseArgs(argc, argv)); @@ -174,7 +174,7 @@ TEST_F(DStubControllerTest, launchProcessInitError) { char* argv[] = { const_cast("progName"), const_cast("-c"), const_cast(DControllerTest::CFG_TEST_FILE), - const_cast("-v") }; + const_cast("-d") }; int argc = 4; // Launch the controller in stand alone mode. @@ -204,7 +204,7 @@ TEST_F(DStubControllerTest, nonexistantConfigFile) { char* argv[] = { const_cast("progName"), const_cast("-c"), const_cast("bogus-file"), - const_cast("-v") }; + const_cast("-d") }; int argc = 4; // Record start time, and invoke launch(). @@ -216,7 +216,7 @@ TEST_F(DStubControllerTest, missingConfigFileName) { // command line to run standalone char* argv[] = { const_cast("progName"), const_cast("-c"), - const_cast("-v") }; + const_cast("-d") }; int argc = 3; // Record start time, and invoke launch(). @@ -227,7 +227,7 @@ TEST_F(DStubControllerTest, missingConfigFileName) { TEST_F(DStubControllerTest, missingConfigFileArgument) { // command line to run standalone char* argv[] = { const_cast("progName"), - const_cast("-v") }; + const_cast("-d") }; int argc = 2; // Record start time, and invoke launch(). diff --git a/src/bin/d2/tests/d_test_stubs.cc b/src/bin/d2/tests/d_test_stubs.cc index fa91cd3518..1cc215255f 100644 --- a/src/bin/d2/tests/d_test_stubs.cc +++ b/src/bin/d2/tests/d_test_stubs.cc @@ -276,7 +276,7 @@ DControllerTest::runWithConfig(const std::string& config, int run_time_ms, char* argv[] = { const_cast("progName"), const_cast("-c"), const_cast(DControllerTest::CFG_TEST_FILE), - const_cast("-v") }; + const_cast("-d") }; launch(4, argv); } catch (...) { // calculate elasped time, then rethrow it