Skip to content

Commit

Permalink
fixed logic with test
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Apr 3, 2024
1 parent 819d957 commit c5249d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/opentrons/protocol_runner/protocol_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ async def _add_command_and_execute(self) -> None:
original_error=result.error,
message=f"{result.error.errorType}: {result.error.detail}",
)
elif result.status == pe_commands.CommandStatus.QUEUED:
break


class LiveRunner(AbstractRunner):
Expand Down
7 changes: 7 additions & 0 deletions api/tests/opentrons/protocol_runner/test_protocol_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,13 @@ async def test_run_json_runner_stop_requested_stops_enquqing(
decoy.when(json_file_reader.read(json_protocol_source)).then_return(json_protocol)
decoy.when(json_translator.translate_commands(json_protocol)).then_return(commands)
decoy.when(json_translator.translate_liquids(json_protocol)).then_return(liquids)
decoy.when(
await protocol_engine.add_and_execute_command(
pe_commands.HomeCreate(params=pe_commands.HomeParams()),
)
).then_return(
pe_commands.Home.construct(status=pe_commands.CommandStatus.SUCCEEDED) # type: ignore[call-arg]
)
decoy.when(
await protocol_engine.add_and_execute_command(
pe_commands.WaitForDurationCreate(
Expand Down

0 comments on commit c5249d3

Please sign in to comment.