Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Dec 12, 2022
1 parent ddd57e5 commit 1c5f4fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
11 changes: 4 additions & 7 deletions scripts/tests/java/discover_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ def RunTest(self):
logging.info("Testing discovering commissionables devices")

if self.command_name == 'commissionables':
java_exit_code = self.TestCmdCommissionables()
if java_exit_code != 0:
logging.error("Testing command commissionables failed with error %r" % java_exit_code)
return java_exit_code

# Testing complete without errors
return 0
code = self.TestCmdCommissionables()
if code != 0:
logging.error(f"Testing command commissionables failed with error {code}")
raise Exception("Failed to discover commissionables devices")
8 changes: 4 additions & 4 deletions scripts/tests/run_java_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def main(app: str, app_args: str, tool_path: str, tool_cluster: str, tool_args:
logging.info("Testing discover cluster")

test = DiscoverTest(log_cooking_threads, log_queue, command, tool_args)
controller_exit_code = test.RunTest()

if controller_exit_code != 0:
logging.error("Test script exited with error %r" % test_script_exit_code)
try:
test.RunTest()
except Exception:
sys.exit(1)

app_exit_code = 0
if app_process:
Expand Down

0 comments on commit 1c5f4fe

Please sign in to comment.