diff --git a/scripts/rabbit_dependencies.sh b/scripts/rabbit_dependencies.sh index 338cdcd818..0c08b9389b 100755 --- a/scripts/rabbit_dependencies.sh +++ b/scripts/rabbit_dependencies.sh @@ -73,10 +73,10 @@ function install_on_debian { ${prefix} apt-get install apt-transport-https libwxbase3.0-0v5 libwxgtk3.0-0v5 libsctp1 build-essential python-dev openssl libssl-dev libevent-dev git ${prefix} apt-get purge -yf erlang* # Add the signing key - wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add - + wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | ${prefix} apt-key add - if [[ ! -f "/etc/apt/sources.list.d/erlang.solutions.list" ]]; then - echo "deb https://packages.erlang-solutions.com/ubuntu $DIST contrib" | sudo tee /etc/apt/sources.list.d/erlang.solutions.list + echo "deb https://packages.erlang-solutions.com/ubuntu $DIST contrib" | ${prefix} tee /etc/apt/sources.list.d/erlang.solutions.list fi version=${erlang_package_version} diff --git a/volttrontesting/testutils/test_platformwrapper.py b/volttrontesting/testutils/test_platformwrapper.py index 2e3864bb14..fb2c75f455 100644 --- a/volttrontesting/testutils/test_platformwrapper.py +++ b/volttrontesting/testutils/test_platformwrapper.py @@ -73,20 +73,30 @@ # p.join() -@pytest.mark.parametrize("messagebus, ssl_auth", [('rmq', True)]) # , ('rmq', False), ('zmq', False)] ) +@pytest.mark.parametrize("messagebus, ssl_auth", [ + ('zmq', False) + # , ('zmq', False) + # , ('rmq', True) +]) def test_can_create(messagebus, ssl_auth): + p = PlatformWrapper(messagebus=messagebus, ssl_auth=ssl_auth) - assert not p.is_running() - assert p.volttron_home.startswith("/tmp/tmp") + try: + assert not p.is_running() + assert p.volttron_home.startswith("/tmp/tmp") + + p.startup_platform(vip_address=get_rand_tcp_address()) + assert p.is_running() + finally: + if p: + p.shutdown_platform() - p.startup_platform(vip_address=get_rand_tcp_address()) - assert p.is_running() - p.shutdown_platform() assert not p.is_running() + @pytest.mark.wrapper def test_volttron_config_created(volttron_instance): config_file = os.path.join(volttron_instance.volttron_home, "config") diff --git a/volttrontesting/utils/platformwrapper.py b/volttrontesting/utils/platformwrapper.py index 7d55853bed..63473c3b29 100644 --- a/volttrontesting/utils/platformwrapper.py +++ b/volttrontesting/utils/platformwrapper.py @@ -422,6 +422,9 @@ def build_agent(self, address=None, should_spawn=True, identity=None, self.logit("BUILD agent VOLTTRON HOME: {}".format(self.volttron_home)) if self.bind_web_address: kwargs['enable_web'] = True + + if 'enable_store' not in kwargs: + kwargs['enable_store'] = False agent = agent_class(address=address, identity=identity, publickey=publickey, secretkey=secretkey, serverkey=serverkey, @@ -716,6 +719,7 @@ def startup_platform(self, vip_address, auth_dict=None, # Use dynamic_agent so we can look and see the agent with peerlist. if not setupmode: + gevent.sleep(2) self.dynamic_agent = self.build_agent(identity="dynamic_agent") assert self.dynamic_agent is not None assert isinstance(self.dynamic_agent, Agent)