diff --git a/docker/crossbar/Dockerfile b/docker/crossbar/Dockerfile index b479604e..32a8724f 100644 --- a/docker/crossbar/Dockerfile +++ b/docker/crossbar/Dockerfile @@ -3,11 +3,15 @@ # https://crossbar.io/docs/Creating-Docker-Images/ # Use ocs base image -FROM crossbario/crossbar:cpy3-20.8.1 +FROM crossbario/crossbar:cpy-slim-amd64-22.6.1 # Run as root to put config in place and chown USER root +# Create crossbar user/group +RUN groupadd -g 242 crossbar && \ + useradd -r -l -u 242 -g 242 crossbar + # Copy in config and requirements files COPY config.json /ocs/.crossbar/config.json RUN chown -R crossbar:crossbar /ocs diff --git a/docker/crossbar/config.json b/docker/crossbar/config.json index 5f1519a0..135d6585 100644 --- a/docker/crossbar/config.json +++ b/docker/crossbar/config.json @@ -76,7 +76,7 @@ "close_handshake_timeout": 1000, "auto_ping_interval": 10000, "auto_ping_timeout": 5000, - "auto_ping_size": 4 + "auto_ping_size": 12 } }, "call": { diff --git a/tests/integration/test_crossbar_integration.py b/tests/integration/test_crossbar_integration.py index 7f2f044a..8a3b67b7 100644 --- a/tests/integration/test_crossbar_integration.py +++ b/tests/integration/test_crossbar_integration.py @@ -41,6 +41,9 @@ def test_fake_data_after_crossbar_restart(wait_for_crossbar): # Set OCS_CONFIG_DIR environment variable os.environ['OCS_CONFIG_DIR'] = os.getcwd() + # give time to reconnect + time.sleep(CROSSBAR_SLEEP) + # Check fake data Agent is accessible and producing new data. therm_client = OCSClient('fake-data1', args=[]) @@ -80,6 +83,9 @@ def test_aggregator_after_crossbar_restart(wait_for_crossbar): # restart crossbar restart_crossbar() + # give time to reconnect + time.sleep(CROSSBAR_SLEEP) + # record current time # now = time.time()