Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Franck Nijhof
4a7644c562
Adjust parallel trace for frontend handling 2022-05-02 14:31:21 +02:00
2 changed files with 5 additions and 5 deletions

View file

@ -988,7 +988,7 @@ class _ScriptRun:
async def async_run_with_trace(idx: int, script: Script) -> None: async def async_run_with_trace(idx: int, script: Script) -> None:
"""Run a script with a trace path.""" """Run a script with a trace path."""
trace_path_stack_cv.set(copy(trace_path_stack_cv.get())) trace_path_stack_cv.set(copy(trace_path_stack_cv.get()))
with trace_path([str(idx), "sequence"]): with trace_path([str(idx)]):
await self._async_run_script(script) await self._async_run_script(script)
results = await asyncio.gather( results = await asyncio.gather(

View file

@ -3012,7 +3012,7 @@ async def test_parallel(hass: HomeAssistant, caplog: pytest.LogCaptureFixture) -
expected_trace = { expected_trace = {
"0": [{"result": {}}], "0": [{"result": {}}],
"0/parallel/0/sequence/0": [ "0/parallel/0/0": [
{ {
"result": { "result": {
"wait": { "wait": {
@ -3025,7 +3025,7 @@ async def test_parallel(hass: HomeAssistant, caplog: pytest.LogCaptureFixture) -
} }
} }
], ],
"0/parallel/1/sequence/0": [ "0/parallel/1/0": [
{ {
"variables": {"wait": {"remaining": None}}, "variables": {"wait": {"remaining": None}},
"result": { "result": {
@ -3034,7 +3034,7 @@ async def test_parallel(hass: HomeAssistant, caplog: pytest.LogCaptureFixture) -
}, },
} }
], ],
"0/parallel/0/sequence/1": [ "0/parallel/0/1": [
{ {
"variables": {"wait": {"remaining": None}}, "variables": {"wait": {"remaining": None}},
"result": { "result": {
@ -3068,7 +3068,7 @@ async def test_parallel_error(
expected_trace = { expected_trace = {
"0": [{"error_type": ServiceNotFound, "result": {}}], "0": [{"error_type": ServiceNotFound, "result": {}}],
"0/parallel/0/sequence/0": [ "0/parallel/0/0": [
{ {
"error_type": ServiceNotFound, "error_type": ServiceNotFound,
"result": { "result": {