This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch 
feature/685-update-container-config-properties-usage
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to 
refs/heads/feature/685-update-container-config-properties-usage by this push:
     new fe5aa598d gh-685: Replace constexpr with define
fe5aa598d is described below

commit fe5aa598dce2de1ea9736d49a9d369ae09c5254f
Author: Pepijn Noltes <pnol...@apache.org>
AuthorDate: Sun Jun 2 22:46:26 2024 +0200

    gh-685: Replace constexpr with define
---
 libs/framework/gtest/src/CelixLauncherTestSuite.cc | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/libs/framework/gtest/src/CelixLauncherTestSuite.cc 
b/libs/framework/gtest/src/CelixLauncherTestSuite.cc
index a50f99ea7..58f0da64f 100644
--- a/libs/framework/gtest/src/CelixLauncherTestSuite.cc
+++ b/libs/framework/gtest/src/CelixLauncherTestSuite.cc
@@ -30,10 +30,10 @@
 #include "celix_stdlib_cleanup.h"
 #include "celix_utils.h"
 
+#define LAUNCH_WAIT_TIMEOUT 100
+
 class CelixLauncherTestSuite : public ::testing::Test {
   public:
-    static constexpr int LAUNCH_WAIT_TIMEOUT{100};
-
     static std::future<void> launchInThread(const std::vector<std::string>& 
args, celix_properties_t* props, int expectedRc) {
         std::string propsStr{};
         if (props) {
@@ -208,7 +208,7 @@ TEST_F(CelixLauncherTestSuite, StopLauncherWithSignalTest) {
     EXPECT_EQ(status, std::future_status::ready);
 }
 
-TEST_F(CelixLauncherTestSuite, DoubleStartAndStopLauncher) {
+TEST_F(CelixLauncherTestSuite, DoubleStartAndStopLauncherTest) {
         // When launching the framework
         auto future = launchInThread({"programName"}, nullptr, 0);
 
@@ -235,3 +235,11 @@ TEST_F(CelixLauncherTestSuite, DoubleStartAndStopLauncher) 
{
 
         // Then nothing happens
 }
+
+TEST_F(CelixLauncherTestSuite, StartWithInvalidEmbeddedPropertiesTest) {
+    //When launching the framework with an invalid embedded properties
+    auto rc = celix_launcher_launchAndWait(0, nullptr, "invalid props");
+
+    //Then the launch will exit with a return code of 1
+    EXPECT_EQ(1, rc);
+}

Reply via email to