From 5bea3a2bbe5d1f423eced686cde6d7c47240e76a Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Fri, 21 Aug 2026 12:58:04 -0700 Subject: [PATCH] Declare Logging in the test target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `test/test_worker_lifecycle.jl` does `using Logging`, but `Logging` was in neither `[extras]` nor the `test` target, so `Pkg.test()` always ended in ArgumentError: Package Logging not found in current path at test_worker_lifecycle.jl:235 — "A slow environment activation is reported while it is still running". That test item has therefore never run, and the error has been repeatedly re-investigated as a regression during unrelated work because it is the last thing the suite prints. Also corrects a comment I got wrong in the timeout diagnostics: it said the `isdefined` guard around `outbound_backlog` was there because "the compat bound still allows a JSONRPC without the accessor". There is no compat bound — TestItemControllers vendors JSONRPC rather than depending on it, so what decides whether the accessor exists is when `packages/JSONRPC` was last re-vendored. The guard itself is right and stays. Co-Authored-By: Claude Opus 5 --- CHANGELOG.md | 4 ++++ Project.toml | 3 ++- src/testitemcontroller.jl | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ea1fe3..0bd5880 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2.0.0] - Unreleased +### Fixed + +- `Logging` is now declared in the test target. `test/test_worker_lifecycle.jl` does `using Logging`, so `Pkg.test()` always ended in `ArgumentError: Package Logging not found in current path` — meaning the test item covering the slow-activation warning had never actually run. + ### Added - A test item timeout is now logged with the evidence for *which* channel failed: how long it has been since the test process last sent a JSON-RPC message, how long since it last produced output, whether the process's own hang watchdog left a diagnostics dump, and — on a JSONRPC that can report it — how far behind the connection's outbound queue is. A test process talks to the controller over two independent channels, and a timeout only ever proves that the *result* never arrived. Output still arriving while the socket has gone quiet means the connection died, not the test; before this the two were indistinguishable without reconstructing the run from its artifacts afterwards. diff --git a/Project.toml b/Project.toml index 88a843f..a40e229 100644 --- a/Project.toml +++ b/Project.toml @@ -16,10 +16,11 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" JuliaWorkspaces = "e554591c-7f10-434f-9f27-2097f62a04fd" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" [compat] julia = "1.12" PrecompileTools = "1.3.4" [targets] -test = ["JuliaWorkspaces", "Test", "TestItemRunner", "Pkg"] +test = ["JuliaWorkspaces", "Test", "TestItemRunner", "Pkg", "Logging"] diff --git a/src/testitemcontroller.jl b/src/testitemcontroller.jl index 8a3c82f..a538729 100644 --- a/src/testitemcontroller.jl +++ b/src/testitemcontroller.jl @@ -1530,8 +1530,9 @@ end # The outbound half of a process's JSON-RPC connection, when the JSONRPC in use can report # it. That queue is unbounded, so a peer that has stopped reading never makes a send fail — -# the messages simply accumulate, undelivered. Guarded by `isdefined` because the compat -# bound still allows a JSONRPC without the accessor. +# the messages simply accumulate, undelivered. Guarded by `isdefined` rather than assumed: +# JSONRPC is vendored here, not a dependency with a compat bound, so what decides whether the +# accessor exists is when `packages/JSONRPC` was last re-vendored. function _outbound_backlog(ps::TestProcessState) ps.endpoint === nothing && return nothing isdefined(JSONRPC, :outbound_backlog) || return nothing