You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2021/05/06 16:28:02 UTC

[celix] branch feature/cxx_rsa_update updated (20ad07b -> a1719c2)

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

pnoltes pushed a change to branch feature/cxx_rsa_update
in repository https://gitbox.apache.org/repos/asf/celix.git.


    from 20ad07b  Refactors cxx rsa, improves configured discovery tests and add C++ LogHelper class
     add 6e909a1  Updates based on PR review comments
     add 7ac9466  Trying update to ubuntu 20.04 (from 18.04), because of dependency install issues.
     add 0ba362c  Merge pull request #335 from apache/feature/update_dep_man_handling_in_bundle_activator
     add f49b4c6  Fixes an issue in the bundle activator where components where destroyed to soon.
     add ee890cb  Merge pull request #337 from apache/hotfix/bundle_activator_issue
     add 3df528d  Feature/pubsub websocket serialization (#338)
     add 9513675  Fix binary backward compatibility to celix 2.1 (#339)
     add 39a3d2e  Merge pull request #340 from tira-misu/bugfix/compatible2.1
     add ee23f57  Merge remote-tracking branch 'origin/master' into feature/async_update
     new 123096b  Merge branch 'feature/async_update' into feature/cxx_rsa_update
     new a1719c2  Updates for merge with master and adds rapidjson install to macos ci configuration

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/celix_etcdlib.yml                |   2 +-
 .github/workflows/celix_promise.yml                |   2 +-
 .github/workflows/coverage.yml                     |   2 +-
 .github/workflows/coverity-scan.yml                |   2 +-
 .github/workflows/macos-nightly.yml                |   2 +-
 .github/workflows/macos.yml                        |   2 +-
 .github/workflows/ubuntu-nightly.yml               |   6 +-
 .github/workflows/ubuntu.yml                       |   6 +-
 .../admin/src/RemoteServiceAdmin.cc                |   9 +-
 .../gtest/src/RsaConfiguredDiscoveryTestSuite.cc   |   7 +-
 bundles/pubsub/CMakeLists.txt                      |   3 +-
 bundles/pubsub/pubsub_admin_tcp/v2/CMakeLists.txt  |   2 +-
 .../v2/src/pubsub_tcp_topic_receiver.c             |   1 -
 .../pubsub_admin_websocket/{ => v1}/CMakeLists.txt |   0
 .../{ => v1}/src/psa_activator.c                   |   0
 .../{ => v1}/src/pubsub_psa_websocket_constants.h  |   0
 .../{ => v1}/src/pubsub_websocket_admin.c          |   0
 .../{ => v1}/src/pubsub_websocket_admin.h          |   0
 .../{ => v1}/src/pubsub_websocket_common.c         |   0
 .../{ => v1}/src/pubsub_websocket_common.h         |   0
 .../{ => v1}/src/pubsub_websocket_topic_receiver.c |   0
 .../{ => v1}/src/pubsub_websocket_topic_receiver.h |   0
 .../{ => v1}/src/pubsub_websocket_topic_sender.c   |   0
 .../{ => v1}/src/pubsub_websocket_topic_sender.h   |   0
 .../pubsub_admin_websocket/{ => v2}/CMakeLists.txt |  20 +-
 .../{ => v2}/src/psa_activator.c                   |   6 +-
 .../{ => v2}/src/pubsub_psa_websocket_constants.h  |   0
 .../{ => v2}/src/pubsub_websocket_admin.c          | 267 +++++++++++++--------
 .../{ => v2}/src/pubsub_websocket_admin.h          |  12 +
 .../{ => v2}/src/pubsub_websocket_common.c         |   0
 .../{ => v2}/src/pubsub_websocket_common.h         |   0
 .../{ => v2}/src/pubsub_websocket_topic_receiver.c | 138 +++++------
 .../{ => v2}/src/pubsub_websocket_topic_receiver.h |   6 +-
 .../{ => v2}/src/pubsub_websocket_topic_sender.c   | 121 +++++-----
 .../{ => v2}/src/pubsub_websocket_topic_sender.h   |   7 +-
 bundles/pubsub/test/CMakeLists.txt                 |  74 +++++-
 libs/framework/gtest/CMakeLists.txt                |  20 +-
 .../framework/gtest/src/CmpTestBundleActivator.cc  |  24 +-
 .../gtest/src/CxxBundleActivatorTestSuite.cc       |  55 +++++
 libs/framework/include/celix/BundleActivator.h     |   6 +-
 libs/framework/src/dm_dependency_manager_impl.c    |   3 +-
 41 files changed, 494 insertions(+), 311 deletions(-)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/CMakeLists.txt (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/psa_activator.c (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_psa_websocket_constants.h (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_websocket_admin.c (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_websocket_admin.h (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_websocket_common.c (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_websocket_common.h (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_websocket_topic_receiver.c (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_websocket_topic_receiver.h (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_websocket_topic_sender.c (100%)
 copy bundles/pubsub/pubsub_admin_websocket/{ => v1}/src/pubsub_websocket_topic_sender.h (100%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/CMakeLists.txt (60%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/psa_activator.c (96%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_psa_websocket_constants.h (100%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_websocket_admin.c (68%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_websocket_admin.h (83%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_websocket_common.c (100%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_websocket_common.h (100%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_websocket_topic_receiver.c (87%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_websocket_topic_receiver.h (92%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_websocket_topic_sender.c (77%)
 rename bundles/pubsub/pubsub_admin_websocket/{ => v2}/src/pubsub_websocket_topic_sender.h (90%)
 copy examples/celix-examples/readme_cxx_examples/src/CalcProviderBundleActivator.cc => libs/framework/gtest/src/CmpTestBundleActivator.cc (56%)
 create mode 100644 libs/framework/gtest/src/CxxBundleActivatorTestSuite.cc

[celix] 02/02: Updates for merge with master and adds rapidjson install to macos ci configuration

Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/cxx_rsa_update
in repository https://gitbox.apache.org/repos/asf/celix.git

commit a1719c226bdcf62ecbd708c89a1ece52eb9817c1
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Thu May 6 18:27:47 2021 +0200

    Updates for merge with master and adds rapidjson install to macos ci configuration
---
 .github/workflows/macos-nightly.yml                              | 2 +-
 .github/workflows/macos.yml                                      | 2 +-
 bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc      | 9 +++------
 .../gtest/src/RsaConfiguredDiscoveryTestSuite.cc                 | 7 ++++---
 4 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/macos-nightly.yml b/.github/workflows/macos-nightly.yml
index 98ec7ab..11694c9 100644
--- a/.github/workflows/macos-nightly.yml
+++ b/.github/workflows/macos-nightly.yml
@@ -19,7 +19,7 @@ jobs:
     - name: Install dependencies
       run: |
         brew update
-        brew install lcov zeromq czmq openssl cpputest jansson
+        brew install lcov zeromq czmq openssl cpputest jansson rapidjson
         brew unlink openssl && brew link openssl --force
     - name: Build
       env:
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 363d47a..6023f7d 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -17,7 +17,7 @@ jobs:
     - name: Install dependencies
       run: |
         brew update
-        brew install lcov zeromq czmq openssl cpputest jansson
+        brew install lcov zeromq czmq openssl cpputest jansson rapidjson
         brew unlink openssl && brew link openssl --force
     - name: Build
       env:
diff --git a/bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc b/bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc
index e71c50c..4ed0e2f 100644
--- a/bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc
+++ b/bundles/cxx_remote_services/admin/src/RemoteServiceAdmin.cc
@@ -180,13 +180,11 @@ void celix::rsa::RemoteServiceAdmin::removeService(const std::shared_ptr<void>&
 }
 
 void celix::rsa::RemoteServiceAdmin::createImportServices() {
-    auto it = _toBeImportedServices.begin();
-    while (it != _toBeImportedServices.end()) {
+    for (auto it = _toBeImportedServices.begin(); it != _toBeImportedServices.end(); ++it) {
         auto interface = (*it)->getInterface();
         auto existingFactory = _importServiceFactories.find(interface);
         if (existingFactory == end(_importServiceFactories)) {
             L_DEBUG("Adding endpoint to be imported but no factory available yet, delaying import");
-            ++it;
             continue;
         }
         auto endpointId = (*it)->getId();
@@ -197,8 +195,8 @@ void celix::rsa::RemoteServiceAdmin::createImportServices() {
 }
 
 void celix::rsa::RemoteServiceAdmin::createExportServices() {
-    auto it = _toBeExportedServices.begin();
-    while (it != _toBeExportedServices.end()) {
+
+    for (auto it = _toBeExportedServices.begin(); it != _toBeExportedServices.end(); ++it) {
         const auto& svcProperties = **it;
         auto serviceName = svcProperties.get(celix::SERVICE_NAME, "");
         auto svcId = svcProperties.getAsLong(celix::SERVICE_ID, -1);
@@ -209,7 +207,6 @@ void celix::rsa::RemoteServiceAdmin::createExportServices() {
         auto factory = _exportServiceFactories.find(serviceName);
         if (factory == end(_exportServiceFactories)) {
             L_DEBUG("Adding service to be exported but no factory available yet, delaying creation");
-            ++it;
             continue;
         }
         _exportedServices.emplace(svcId, factory->second->exportService(svcProperties));
diff --git a/bundles/cxx_remote_services/discovery_configured/gtest/src/RsaConfiguredDiscoveryTestSuite.cc b/bundles/cxx_remote_services/discovery_configured/gtest/src/RsaConfiguredDiscoveryTestSuite.cc
index 1f413f1..dcd900f 100644
--- a/bundles/cxx_remote_services/discovery_configured/gtest/src/RsaConfiguredDiscoveryTestSuite.cc
+++ b/bundles/cxx_remote_services/discovery_configured/gtest/src/RsaConfiguredDiscoveryTestSuite.cc
@@ -66,9 +66,9 @@ TEST_F(RsaConfiguredDiscoveryTestSuite, discoverConfiguredEndpoints) {
 }
 
 TEST_F(RsaConfiguredDiscoveryTestSuite, removeConfiguredEndpointFile) {
-    //When I install a configured discovery bundle with also a configured discovery file and will find
+    //When I install a configured discovery bundle with also a configured discovery file, I will find
     //2 EndpointDescriptions.
-    //If I then remove the configured discovery file using the IConfiguredDiscoveryManager service I will find
+    //If I then remove the configured discovery file using the IConfiguredDiscoveryManager service, I will find
     //0 EndpointDescriptions.
 
     auto bndId = ctx->installBundle(RSA_CONFIGURED_DISCOVERY_BUNDLE_LOCATION);
@@ -80,7 +80,8 @@ TEST_F(RsaConfiguredDiscoveryTestSuite, removeConfiguredEndpointFile) {
     count = ctx->useService<celix::rsa::IConfiguredDiscoveryManager>()
                 .addUseCallback([](auto& svc) {
                     auto files = svc.getConfiguredDiscoveryFiles();
-                    EXPECT_EQ(files.size(), 1);
+                    ASSERT_EQ(files.size(), 1);
+                    EXPECT_EQ(files[0], RSA_CONFIGURED_DISCOVERY_DISCOVERY_FILE);
                     svc.removeConfiguredDiscoveryFile(RSA_CONFIGURED_DISCOVERY_DISCOVERY_FILE);
                 })
                 .build();

[celix] 01/02: Merge branch 'feature/async_update' into feature/cxx_rsa_update

Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/cxx_rsa_update
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 123096bc91f55a988481db89ba8fd01cbcf9c9d6
Merge: 20ad07b ee23f57
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Thu May 6 18:19:21 2021 +0200

    Merge branch 'feature/async_update' into feature/cxx_rsa_update
    
    # Conflicts:
    #	bundles/async_remote_services/admin/src/admin.cc
    #	libs/framework/gtest/CMakeLists.txt

 .github/workflows/celix_etcdlib.yml                |   2 +-
 .github/workflows/celix_promise.yml                |   2 +-
 .github/workflows/coverage.yml                     |   2 +-
 .github/workflows/coverity-scan.yml                |   2 +-
 .github/workflows/ubuntu-nightly.yml               |   6 +-
 .github/workflows/ubuntu.yml                       |   6 +-
 bundles/pubsub/CMakeLists.txt                      |   3 +-
 bundles/pubsub/pubsub_admin_tcp/v2/CMakeLists.txt  |   2 +-
 .../v2/src/pubsub_tcp_topic_receiver.c             |   1 -
 .../pubsub_admin_websocket/{ => v1}/CMakeLists.txt |   0
 .../{ => v1}/src/psa_activator.c                   |   0
 .../{ => v1}/src/pubsub_psa_websocket_constants.h  |   0
 .../{ => v1}/src/pubsub_websocket_admin.c          |   0
 .../{ => v1}/src/pubsub_websocket_admin.h          |   0
 .../{ => v1}/src/pubsub_websocket_common.c         |   0
 .../{ => v1}/src/pubsub_websocket_common.h         |   0
 .../{ => v1}/src/pubsub_websocket_topic_receiver.c |   0
 .../{ => v1}/src/pubsub_websocket_topic_receiver.h |   0
 .../{ => v1}/src/pubsub_websocket_topic_sender.c   |   0
 .../{ => v1}/src/pubsub_websocket_topic_sender.h   |   0
 .../pubsub_admin_websocket/{ => v2}/CMakeLists.txt |  20 +-
 .../{ => v2}/src/psa_activator.c                   |   6 +-
 .../{ => v2}/src/pubsub_psa_websocket_constants.h  |   0
 .../{ => v2}/src/pubsub_websocket_admin.c          | 267 +++++++++++++--------
 .../{ => v2}/src/pubsub_websocket_admin.h          |  12 +
 .../{ => v2}/src/pubsub_websocket_common.c         |   0
 .../{ => v2}/src/pubsub_websocket_common.h         |   0
 .../{ => v2}/src/pubsub_websocket_topic_receiver.c | 138 +++++------
 .../{ => v2}/src/pubsub_websocket_topic_receiver.h |   6 +-
 .../{ => v2}/src/pubsub_websocket_topic_sender.c   | 121 +++++-----
 .../{ => v2}/src/pubsub_websocket_topic_sender.h   |   7 +-
 bundles/pubsub/test/CMakeLists.txt                 |  74 +++++-
 libs/framework/gtest/CMakeLists.txt                |  20 +-
 .../framework/gtest/src/CmpTestBundleActivator.cc  |  44 ++--
 .../gtest/src/CxxBundleActivatorTestSuite.cc       |  55 +++++
 libs/framework/include/celix/BundleActivator.h     |   6 +-
 libs/framework/src/dm_dependency_manager_impl.c    |   3 +-
 37 files changed, 493 insertions(+), 312 deletions(-)

diff --cc libs/framework/gtest/CMakeLists.txt
index 178735a,d898d72..9880463
--- a/libs/framework/gtest/CMakeLists.txt
+++ b/libs/framework/gtest/CMakeLists.txt
@@@ -43,7 -44,7 +44,8 @@@ add_executable(test_framewor
          src/HelloWorldCxxActivator.cc
          src/CxxFilterTestSuite.cc
          src/CxxFrameworkFactoryTestSuite.cc
+         src/CxxBundleActivatorTestSuite.cc
 +        src/CxxUtilsTestSuite.cc
  )
  
  target_link_libraries(test_framework Celix::framework CURL::libcurl GTest::gtest GTest::gtest_main)