celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlenfer...@apache.org
Subject [celix] 03/03: Fixes for topology manager test
Date Wed, 26 Jun 2019 20:38:56 GMT
This is an automated email from the ASF dual-hosted git repository.

rlenferink pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git

commit f5cf56193747a112591fcf672469666181fa9d56
Author: Roy Lenferink <lenferinkroy@gmail.com>
AuthorDate: Wed Jun 26 21:23:35 2019 +0200

    Fixes for topology manager test
---
 .../examples/calculator_api/include/calculator_service.h    |  4 ++--
 .../remote_services/topology_manager/tms_tst/scope2.json    |  2 +-
 .../remote_services/topology_manager/tms_tst/scope3.json    |  4 ++--
 .../remote_services/topology_manager/tms_tst/scope4.json    |  2 +-
 .../remote_services/topology_manager/tms_tst/tms_tests.cpp  | 13 +++++++------
 5 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/bundles/remote_services/examples/calculator_api/include/calculator_service.h
b/bundles/remote_services/examples/calculator_api/include/calculator_service.h
index aebbd2a..579e06f 100644
--- a/bundles/remote_services/examples/calculator_api/include/calculator_service.h
+++ b/bundles/remote_services/examples/calculator_api/include/calculator_service.h
@@ -28,7 +28,7 @@
 #define CALCULATOR_SERVICE_H_
 
 #define CALCULATOR_SERVICE              "org.apache.celix.calc.api.Calculator"
-#define CALCULATOR_CONFIGURATION_TYPE	"org.amdatu.remote.admin.http"
+#define CALCULATOR_CONFIGURATION_TYPE   "org.amdatu.remote.admin.http"
 
 typedef struct calculator *calculator_pt;
 
@@ -47,7 +47,7 @@ struct calculator_service {
     calculator_pt calculator;
     int (*add)(calculator_pt calculator, double a, double b, double *result);
     int (*sub)(calculator_pt calculator, double a, double b, double *result);
-	int (*sqrt)(calculator_pt calculator, double a, double *result);
+    int (*sqrt)(calculator_pt calculator, double a, double *result);
 };
 
 
diff --git a/bundles/remote_services/topology_manager/tms_tst/scope2.json b/bundles/remote_services/topology_manager/tms_tst/scope2.json
index 4115c2f..0d2daef 100644
--- a/bundles/remote_services/topology_manager/tms_tst/scope2.json
+++ b/bundles/remote_services/topology_manager/tms_tst/scope2.json
@@ -1,7 +1,7 @@
 {
 "exportServices": [
 {
-"filter": "(&(objectClass=org.apache.celix.calc.api.Calculator2)(module=Calc))",
+"filter": "(&(objectClass=org.apache.celix.calc.api.Calculator)(module=Calc))",
 "zone": "thales"
 },
 {
diff --git a/bundles/remote_services/topology_manager/tms_tst/scope3.json b/bundles/remote_services/topology_manager/tms_tst/scope3.json
index c7c0b29..efa1b40 100644
--- a/bundles/remote_services/topology_manager/tms_tst/scope3.json
+++ b/bundles/remote_services/topology_manager/tms_tst/scope3.json
@@ -1,12 +1,12 @@
 {
 "exportServices": [
 {
-"filter": "(&(objectClass=org.apache.celix.calc.api.Calculator2)(module=Calc))",
+"filter": "(&(objectClass=org.apache.celix.calc.api.Calculator)(module=Calc))",
 "zone": "thales",
 "key1": "value1"
 },
 {
-"filter": "(&(objectClass=org.apache.celix.calc.api.Calculator2)(module=Calc))",
+"filter": "(&(objectClass=org.apache.celix.calc.api.Calculator)(module=Calc))",
 "zone": "same_property_name_so_shall_give_Error"
 },
 {
diff --git a/bundles/remote_services/topology_manager/tms_tst/scope4.json b/bundles/remote_services/topology_manager/tms_tst/scope4.json
index 2eccb63..5f98cd8 100644
--- a/bundles/remote_services/topology_manager/tms_tst/scope4.json
+++ b/bundles/remote_services/topology_manager/tms_tst/scope4.json
@@ -1,7 +1,7 @@
 {
 "exportServices": [
 {
-"filter": "(objectClass=org.apache.celix.calc.api.Calculator2)",
+"filter": "(objectClass=org.apache.celix.calc.api.Calculator)",
 "zone": "thales"
 },
 {
diff --git a/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp b/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
index ebe515b..623bb32 100644
--- a/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
+++ b/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
@@ -388,11 +388,11 @@ extern "C" {
 
         printf("\nBegin: %s\n", __func__);
         scopeInit("scope.json", &nr_exported, &nr_imported);
-        CHECK_EQUAL(1, nr_exported);
+        CHECK_EQUAL(2, nr_exported);
         CHECK_EQUAL(0, nr_imported);
 
         discMock->getEPDescriptors(discMock->handle, &epList);
-        // We export two services: Calculator and Calculator2, but only 1 has DFI bundle
info
+        // We export one service: Calculator, which has DFI bundle info
         CHECK_EQUAL(1, arrayList_size(epList));
         for (unsigned int i = 0; i < arrayList_size(epList); i++) {
             endpoint_description_pt ep = (endpoint_description_pt) arrayList_get(epList,
i);
@@ -425,10 +425,10 @@ extern "C" {
         array_list_pt epList;
         printf("\nBegin: %s\n", __func__);
         scopeInit("scope2.json", &nr_exported, &nr_imported);
-        CHECK_EQUAL(2, nr_exported);
+        CHECK_EQUAL(3, nr_exported);
         CHECK_EQUAL(1, nr_imported);
         discMock->getEPDescriptors(discMock->handle, &epList);
-        // We export two services: Calculator and Calculator2, but only 1 has DFI bundle
info
+        // We export one service: Calculator, which has DFI bundle info
         CHECK_EQUAL(1, arrayList_size(epList));
         for (unsigned int i = 0; i < arrayList_size(epList); i++) {
             endpoint_description_pt ep = (endpoint_description_pt) arrayList_get(epList,
i);
@@ -450,9 +450,10 @@ extern "C" {
         array_list_pt epList;
         printf("\nBegin: %s\n", __func__);
         scopeInit("scope3.json", &nr_exported, &nr_imported);
-        CHECK_EQUAL(2, nr_exported);
+        CHECK_EQUAL(3, nr_exported);
+        CHECK_EQUAL(1, nr_imported);
         discMock->getEPDescriptors(discMock->handle, &epList);
-        // We export two services: Calculator and Calculator2, but only 1 has DFI bundle
info
+        // We export one service: Calculator, which has DFI bundle info
         CHECK_EQUAL(1, arrayList_size(epList));
         for (unsigned int i = 0; i < arrayList_size(epList); i++) {
             endpoint_description_pt ep = (endpoint_description_pt) arrayList_get(epList,
i);


Mime
View raw message