Skip to content

Commit

Permalink
Fix test_package error.
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng committed Jun 24, 2024
1 parent 95a34d8 commit 00dc17a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
9 changes: 0 additions & 9 deletions libs/framework/gtest/src/CelixLauncherTestSuite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,6 @@ TEST_F(CelixLauncherTestSuite, LaunchWithInvalidConfigPropertiesTest) {
//Then the launch will exit
auto status = future.wait_for(std::chrono::milliseconds{LAUNCH_WAIT_TIMEOUT});
EXPECT_EQ(status, std::future_status::ready);

//When launching the framework with a properties set with a negative shutdown period
auto* props = celix_properties_create();
ASSERT_TRUE(props != nullptr);
celix_properties_setDouble(props, CELIX_LAUNCHER_SHUTDOWN_PERIOD_IN_SECONDS, -1.0);
future = launchInThread({"programName"}, props, 1);
//Then launch will exit
status = future.wait_for(std::chrono::milliseconds{LAUNCH_WAIT_TIMEOUT});
EXPECT_EQ(status, std::future_status::ready);
}


Expand Down
7 changes: 5 additions & 2 deletions libs/framework/src/celix_launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,12 @@ int celix_launcher_launchAndWait(int argc, char* argv[], const char* embeddedCon
return CELIX_LAUNCHER_ERROR_EXIT_CODE;
}
status = celix_launcher_setGlobalFramework(framework);
if (status == CELIX_SUCCESS) {
celix_framework_waitForStop(framework);
if (status != CELIX_SUCCESS) {
celix_bundleContext_log(celix_framework_getFrameworkContext(framework), CELIX_LOG_LEVEL_WARNING,
"Failed to schedule celix_shutdown_check");
status = CELIX_SUCCESS;
}
celix_framework_waitForStop(framework);
celix_launcher_resetLauncher();
#ifndef CELIX_NO_CURLINIT
// Cleanup Curl
Expand Down

0 comments on commit 00dc17a

Please sign in to comment.