diff --git a/tests/integration/test_04_race_condition.cpp b/tests/integration/test_04_race_condition.cpp index 130c336..941b6c0 100644 --- a/tests/integration/test_04_race_condition.cpp +++ b/tests/integration/test_04_race_condition.cpp @@ -67,8 +67,7 @@ int main() { try { auto module = loader.load(modulePath, "TestModule", false); - nlohmann::json configJson; - configJson["version"] = "v1"; + nlohmann::json configJson = nlohmann::json::object(); auto config = std::make_unique("config", configJson); module->setConfiguration(*config, nullptr, nullptr); moduleSystem->registerModule("TestModule", std::move(module)); diff --git a/tests/modules/TestModule.cpp b/tests/modules/TestModule.cpp index 0e748eb..79ea062 100644 --- a/tests/modules/TestModule.cpp +++ b/tests/modules/TestModule.cpp @@ -54,9 +54,9 @@ public: // Clone configuration for storage config = std::make_unique("config", nlohmann::json::object()); - // Extract version if available (use current moduleVersion as default) - moduleVersion = configNode.getString("version", moduleVersion); - std::cout << "[TestModule] Version set to: " << moduleVersion << std::endl; + // Note: moduleVersion is a global compiled into the .so file + // We DO NOT overwrite it from config to preserve hot-reload version changes + std::cout << "[TestModule] Compiled version: " << moduleVersion << std::endl; } const IDataNode& getConfiguration() override {