test(managed): cover stopping admission overlap

This commit is contained in:
Nils Andreas Svee committed 2026-08-10 00:27:18 +07:00
1 parent dd396a8b5a
commit 8d47dc9c6e
2 files changed
+92 -3

No files matched your search

+7 -3
View File
@@ -257,9 +257,13 @@ impl ManagedClientHandle {
hook.pause_after_admission();
}
// Submission linearizes at the successful `try_send` below. The
// driver checks stop immediately before non-suspending application;
// terminal sealing closes the receiver before draining accepted work.
// Observing `Open` only permits attempting submission. A successful
// `try_send` transfers command ownership to the driver. A concurrent
// stop may move admission to `Stopping` before this send, allowing the
// command to enqueue; the driver-side check immediately before
// `apply_targets` determines whether it applies or resolves as
// `Stopping`. Terminal sealing closes the receiver before draining
// accepted commands.
let (acknowledgement, receiver) = oneshot::channel();
match self.commands.try_send(ManagedCommand::UpdateTargets {
targets,