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/06/10 17:08:01 UTC
[celix] branch feature/use_async_api_for_rsa updated: Adds missing
syncs to C remote service topology manager tests
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/use_async_api_for_rsa
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/feature/use_async_api_for_rsa by this push:
new 065deec Adds missing syncs to C remote service topology manager tests
065deec is described below
commit 065deec12bf0bd4c96c748b715c574cd47e3a9c2
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Thu Jun 10 19:07:48 2021 +0200
Adds missing syncs to C remote service topology manager tests
---
.../topology_manager/tms_tst/tms_tests.cpp | 42 +++++++++-------------
1 file changed, 16 insertions(+), 26 deletions(-)
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 b44f126..92bc86b 100644
--- a/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
+++ b/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
@@ -465,32 +465,6 @@ extern "C" {
printf("End: %s\n", __func__);
}
- /// \TEST_CASE_ID{5}
- /// \TEST_CASE_TITLE{Test scope initialisation}
- /// \TEST_CASE_REQ{REQ-5}
- /// \TEST_CASE_DESC Invalid input file, two partly matching filters with same key name
- /*
- static void testScope4(void) {
- int nr_exported;
- int nr_imported;
- array_list_pt epList;
- printf("\nBegin: %s\n", __func__);
- scopeInit("scope4.json", &nr_exported, &nr_imported);
- EXPECT_EQ(2, nr_exported);
- discMock->getEPDescriptors(discMock->handle, &epList);
- // We export two services: Calculator and Calculator2, but only 1 has DFI bundle info
- EXPECT_EQ(1, arrayList_size(epList));
- for (unsigned int i = 0; i < arrayList_size(epList); i++) {
- endpoint_description_t *ep = (endpoint_description_t *) arrayList_get(epList, i);
- celix_properties_t *props = ep->properties;
- hash_map_entry_pt entry = hashMap_getEntry(props, (void*)"zone");
- char* value = (char*) hashMapEntry_getValue(entry);
- EXPECT_STREQ("inaetics", value);
- EXPECT_TRUE_TRUE((entry == NULL));
- }
- printf("End: %s\n", __func__);
- }*/
-
/// \TEST_CASE_ID{6}
/// \TEST_CASE_TITLE{Test import scope}
/// \TEST_CASE_REQ{REQ-3}
@@ -521,12 +495,16 @@ extern "C" {
rc = eplService->endpointAdded(eplService->handle, endpoint, NULL);
EXPECT_EQ(CELIX_SUCCESS, rc);
+ celix_framework_waitForEmptyEventQueue(framework);
+
bool imported = testImport->IsImported(testImport);
EXPECT_EQ(true, imported);
rc = eplService->endpointRemoved(eplService->handle, endpoint, NULL);
EXPECT_EQ(CELIX_SUCCESS, rc);
+ celix_framework_waitForEmptyEventQueue(framework);
+
rc = endpointDescription_destroy(endpoint);
EXPECT_EQ(CELIX_SUCCESS, rc);
@@ -564,12 +542,16 @@ extern "C" {
rc = eplService->endpointAdded(eplService->handle, endpoint, NULL);
EXPECT_EQ(CELIX_SUCCESS, rc);
+ celix_framework_waitForEmptyEventQueue(framework);
+
bool imported = testImport->IsImported(testImport);
EXPECT_EQ(true, imported);
rc = eplService->endpointRemoved(eplService->handle, endpoint, NULL);
EXPECT_EQ(CELIX_SUCCESS, rc);
+ celix_framework_waitForEmptyEventQueue(framework);
+
rc = endpointDescription_destroy(endpoint);
EXPECT_EQ(CELIX_SUCCESS, rc);
@@ -606,12 +588,16 @@ extern "C" {
rc = eplService->endpointAdded(eplService->handle, endpoint, NULL);
EXPECT_EQ(CELIX_SUCCESS, rc);
+ celix_framework_waitForEmptyEventQueue(framework);
+
bool imported = testImport->IsImported(testImport);
EXPECT_EQ(false, imported);
rc = eplService->endpointRemoved(eplService->handle, endpoint, NULL);
EXPECT_EQ(CELIX_SUCCESS, rc);
+ celix_framework_waitForEmptyEventQueue(framework);
+
rc = endpointDescription_destroy(endpoint);
EXPECT_EQ(CELIX_SUCCESS, rc);
@@ -649,12 +635,16 @@ extern "C" {
EXPECT_EQ(CELIX_SUCCESS, rc);
celix_framework_waitForEmptyEventQueue(framework);
+
+ celix_framework_waitForEmptyEventQueue(framework);
bool imported = testImport->IsImported(testImport);
EXPECT_EQ(true, imported);
rc = eplService->endpointRemoved(eplService->handle, endpoint, NULL);
EXPECT_EQ(CELIX_SUCCESS, rc);
+ celix_framework_waitForEmptyEventQueue(framework);
+
rc = endpointDescription_destroy(endpoint);
EXPECT_EQ(CELIX_SUCCESS, rc);