Skip to content

Logic to handle premature ready_to_run_testitems event #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/testitemcontroller.jl
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,19 @@
else
error("Unknown message")
end
elseif msg.source==:testprocess
elseif msg.source == :testprocess

Check warning on line 410 in src/testitemcontroller.jl

View check run for this annotation

Codecov / codecov/patch

src/testitemcontroller.jl#L410

Added line #L410 was not covered by tests
# We can run into situations where the :get_procs_for_testrun event has not completed
# but the test proccess has flagged that it is ready. This if check handles making
# sure that we've prepared the process
if msg.msg.event == :ready_to_run_testitems
put!(msg.msg.channel, (event=:run_testitems, testitems=collect(valid_test_items[i] for i in testitem_ids_by_proc[msg.msg.id])))
if haskey(testitem_ids_by_proc, msg.msg.id)
put!(msg.msg.channel, (event=:run_testitems, testitems=collect(valid_test_items[i] for i in testitem_ids_by_proc[msg.msg.id])))

Check warning on line 416 in src/testitemcontroller.jl

View check run for this annotation

Codecov / codecov/patch

src/testitemcontroller.jl#L415-L416

Added lines #L415 - L416 were not covered by tests
# If we haven't populated the process::test_id mapping yet, put the run event back in the queue and yield
# so another task can make progress (e.g. running a sub Julia process to get version info)
else
put!(testrun_msg_queue, msg)
yield()

Check warning on line 421 in src/testitemcontroller.jl

View check run for this annotation

Codecov / codecov/patch

src/testitemcontroller.jl#L420-L421

Added lines #L420 - L421 were not covered by tests
end
elseif msg.msg.event == :attach_debugger
attach_debugger_callback(testrun_id, msg.msg.debug_pipe_name)
elseif msg.msg.event == :precompile_done
Expand Down
Loading