Skip to content

Commit

Permalink
Use -v instead of -vv in logging for tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
craig8 committed Nov 9, 2023
1 parent 2c0159e commit 97a47a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
6 changes: 2 additions & 4 deletions volttrontesting/fixtures/volttron_platform_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ def build_wrapper(vip_address: str, should_start: bool = True, messagebus: str =
auth_enabled=kwargs.pop('auth_enabled', True))
if should_start:
wrapper.startup_platform(vip_address=vip_address, **kwargs)
if wrapper.messagebus == 'rmq':
gevent.sleep(5)
else:
gevent.sleep(2)
if not wrapper.dynamic_agent:
raise ValueError(f"Couldn't start platform successfully for {wrapper.messagebus}")
assert wrapper.is_running()
return wrapper

Expand Down
24 changes: 12 additions & 12 deletions volttrontesting/utils/platformwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,37 +628,37 @@ def add_capabilities(self, publickey, capabilities):
# auth.update rpc call. So sleeping here instead expecting individual test cases to sleep for long
gevent.sleep(2)
return True

file_types = Union[Literal["raw"], Literal["json"], Literal["csv"]]

def config_store_get(self, vip_identity: str, name: str, file_type: Optional[Literal["raw"]] = None) -> str:
with with_os_environ(self.env):
self.__wait_for_control_connection_to_exit__()
env = self.env.copy()
file_type = None if file_type is None else "--raw"

cmd = ['volttron-ctl', '--json', 'config', 'get', vip_identity, name]

if file_type:
cmd.append(file_type)

res = execute_command(cmd, env=env, logger=_log)

print(res)
return res

def config_store_store(self, identity: str, name: str, infile: Path, file_type: file_types = "json"):
with with_os_environ(self.env):
self.__wait_for_control_connection_to_exit__()
env = self.env.copy()
file_type = "--" + file_type

cmd = ['volttron-ctl', '--json', 'config', 'store', identity, name, infile.absolute().as_posix(), file_type]

res = execute_command(cmd, env=env, logger=_log)

print(res)


def add_capability(self, entry, capabilities):
if not self.auth_enabled:
Expand Down Expand Up @@ -944,7 +944,7 @@ def startup_platform(self, vip_address, auth_dict=None,
# if msgdebug:
# cmd.append('--msgdebug')
if enable_logging:
cmd.append('-vv')
cmd.append('-v')
cmd.append('-l{}'.format(self.log_path))
if setupmode:
cmd.append('--setup-mode')
Expand Down

0 comments on commit 97a47a0

Please sign in to comment.