This is an automated email from the ASF dual-hosted git repository. pengzheng pushed a commit to branch hotfix/653-cxx_remote_services_test_crash_stopgap in repository https://gitbox.apache.org/repos/asf/celix.git
commit f371369f43e7c02ba7a48ce1528a4080bdcc5937 Author: PengZheng <[email protected]> AuthorDate: Mon Sep 25 10:29:59 2023 +0800 Workaround the lifecycle management issue of IImportRegistration. It avoids a testing crash. --- bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc | 1 + .../integration/gtest/src/RemoteServicesIntegrationTestSuite.cc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc b/bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc index 962eea71..5c14b263 100644 --- a/bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc +++ b/bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc @@ -115,6 +115,7 @@ void celix::rsa::RemoteServiceAdmin::removeImportedServiceFactory( importServiceFactories.erase(targetServiceName); //TODO remove imported services from this factory ??needed + //FIXME yes, it will lead to crash if we uninstall the factory: https://github.com/apache/celix/issues/653 } void celix::rsa::RemoteServiceAdmin::addExportedServiceFactory( diff --git a/bundles/cxx_remote_services/integration/gtest/src/RemoteServicesIntegrationTestSuite.cc b/bundles/cxx_remote_services/integration/gtest/src/RemoteServicesIntegrationTestSuite.cc index 69e2d5f7..f611d666 100644 --- a/bundles/cxx_remote_services/integration/gtest/src/RemoteServicesIntegrationTestSuite.cc +++ b/bundles/cxx_remote_services/integration/gtest/src/RemoteServicesIntegrationTestSuite.cc @@ -57,8 +57,8 @@ public: PS_PSA_BUNDLE_LOC, PS_WIRE_BUNDLE_LOC, RS_DISCOVERY_BUNDLE_LOC, - RS_RSA_BUNDLE_LOC, - RS_FACTORY_BUNDLE_LOC }; + RS_FACTORY_BUNDLE_LOC , + RS_RSA_BUNDLE_LOC}; for (const auto& bndLoc : sharedBundles) { auto bndId = ctx->installBundle(bndLoc); EXPECT_GE(bndId, 0);
