celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlenfer...@apache.org
Subject [celix] 01/02: Updated docs and tests to include DISCOVERY_CFG_POLL_TIMEOUT
Date Fri, 21 Jun 2019 16:57:14 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 feff559c64d5b498712807ce08dbda03365f1fc6
Author: Roy Lenferink <lenferinkroy@gmail.com>
AuthorDate: Fri Jun 21 09:32:04 2019 +0200

    Updated docs and tests to include DISCOVERY_CFG_POLL_TIMEOUT
---
 bundles/remote_services/README.md                                     | 1 +
 .../remote_services/discovery_common/src/endpoint_discovery_poller.c  | 4 ++--
 .../remote_service_admin_dfi/test/client.properties.in                | 3 ++-
 .../remote_service_admin_dfi/test/server.properties.in                | 3 ++-
 .../remote_service_admin_shm/private/test/client.properties.in        | 1 +
 .../remote_service_admin_shm/private/test/server.properties.in        | 1 +
 6 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/bundles/remote_services/README.md b/bundles/remote_services/README.md
index 4d0f261..8bd8bc7 100644
--- a/bundles/remote_services/README.md
+++ b/bundles/remote_services/README.md
@@ -80,6 +80,7 @@ Provides a service discovery with preconfigured discovery endpoints, allowing
a
 |--|--|
 | **Configuration** | `DISCOVERY_CFG_POLL_ENDPOINTS`: defines a comma-separated list of discovery
endpoints that should be used to query for remote services. Defaults to `http://localhost:9999/org.apache.celix.discovery.configured`;
|
 | | `DISCOVERY_CFG_POLL_INTERVAL`: defines the interval (in seconds) in which the discovery
endpoints should be polled. Defaults to `10` seconds. |
+| | `DISCOVERY_CFG_POLL_TIMEOUT`: defines the maximum time (in seconds) a request of the
discovery endpoint poller may take. Defaults to `10` seconds. |
 | | `DISCOVERY_CFG_SERVER_PORT`: defines the port on which the HTTP server should listen
for incoming requests from other configured discovery endpoints. Defaults to port `9999`;
|
 | | `DISCOVERY_CFG_SERVER_PATH`: defines the path on which the HTTP server should accept
requests from other configured discovery endpoints. Defaults to `/org.apache.celix.discovery.configured`.
|
 
diff --git a/bundles/remote_services/discovery_common/src/endpoint_discovery_poller.c b/bundles/remote_services/discovery_common/src/endpoint_discovery_poller.c
index c481e77..2baec0c 100644
--- a/bundles/remote_services/discovery_common/src/endpoint_discovery_poller.c
+++ b/bundles/remote_services/discovery_common/src/endpoint_discovery_poller.c
@@ -256,7 +256,7 @@ celix_status_t endpointDiscoveryPoller_poll(endpoint_discovery_poller_pt
poller,
 	status = endpointDiscoveryPoller_getEndpoints(poller, url, &updatedEndpoints);
 
 	if (status == CELIX_SUCCESS) {
-		if (updatedEndpoints!=NULL) {
+		if (updatedEndpoints != NULL) {
 			for (unsigned int i = arrayList_size(currentEndpoints); i > 0; i--) {
 				endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i - 1);
 
@@ -281,7 +281,7 @@ celix_status_t endpointDiscoveryPoller_poll(endpoint_discovery_poller_pt
poller,
 		}
 	}
 
-	if(updatedEndpoints!=NULL){
+	if (updatedEndpoints != NULL) {
 		arrayList_destroy(updatedEndpoints);
 	}
 
diff --git a/bundles/remote_services/remote_service_admin_dfi/test/client.properties.in b/bundles/remote_services/remote_service_admin_dfi/test/client.properties.in
index a9a06fb..b0dd8a0 100644
--- a/bundles/remote_services/remote_service_admin_dfi/test/client.properties.in
+++ b/bundles/remote_services/remote_service_admin_dfi/test/client.properties.in
@@ -5,4 +5,5 @@ DISCOVERY_CFG_SERVER_PORT=50991
 DISCOVERY_CFG_POLL_ENDPOINTS=http://127.0.0.1:50992/org.apache.celix.discovery.configured
 org.osgi.framework.storage.clean=onFirstInit
 org.osgi.framework.storage=.cacheClient
-DISCOVERY_CFG_POLL_INTERVAL=1
\ No newline at end of file
+DISCOVERY_CFG_POLL_INTERVAL=1
+DISCOVERY_CFG_POLL_TIMEOUT=5
\ No newline at end of file
diff --git a/bundles/remote_services/remote_service_admin_dfi/test/server.properties.in b/bundles/remote_services/remote_service_admin_dfi/test/server.properties.in
index 707c7e6..9cda10f 100644
--- a/bundles/remote_services/remote_service_admin_dfi/test/server.properties.in
+++ b/bundles/remote_services/remote_service_admin_dfi/test/server.properties.in
@@ -20,4 +20,5 @@ RSA_PORT=50882
 DISCOVERY_CFG_SERVER_PORT=50992
 org.osgi.framework.storage.clean=onFirstInit
 org.osgi.framework.storage=.cacheServer
-DISCOVERY_CFG_POLL_INTERVAL=1
\ No newline at end of file
+DISCOVERY_CFG_POLL_INTERVAL=1
+DISCOVERY_CFG_POLL_TIMEOUT=5
\ No newline at end of file
diff --git a/bundles/remote_services/remote_service_admin_shm/private/test/client.properties.in
b/bundles/remote_services/remote_service_admin_shm/private/test/client.properties.in
index d4eb239..5b7954d 100644
--- a/bundles/remote_services/remote_service_admin_shm/private/test/client.properties.in
+++ b/bundles/remote_services/remote_service_admin_shm/private/test/client.properties.in
@@ -23,3 +23,4 @@ DISCOVERY_CFG_SERVER_PORT=50993
 org.osgi.framework.storage.clean=onFirstInit
 org.osgi.framework.storage=.cacheClient
 DISCOVERY_CFG_POLL_INTERVAL=1
+DISCOVERY_CFG_POLL_TIMEOUT=5
diff --git a/bundles/remote_services/remote_service_admin_shm/private/test/server.properties.in
b/bundles/remote_services/remote_service_admin_shm/private/test/server.properties.in
index 0b40556..31b1b31 100644
--- a/bundles/remote_services/remote_service_admin_shm/private/test/server.properties.in
+++ b/bundles/remote_services/remote_service_admin_shm/private/test/server.properties.in
@@ -23,3 +23,4 @@ DISCOVERY_CFG_SERVER_PORT=50994
 org.osgi.framework.storage.clean=onFirstInit
 org.osgi.framework.storage=.cacheServer
 DISCOVERY_CFG_POLL_INTERVAL=1
+DISCOVERY_CFG_POLL_TIMEOUT=5


Mime
View raw message