Linux-Wackeltests: Instanz endet erst auf die Stopp-Bitte, Lesetest schreibt bis genug gelesen ist (#722)
Drei Manager-Tests liessen den Prozess vor der Stopp-Bitte enden; unter Last sah der Aufsichtstakt das zuerst und meldete Crashed statt Stopped. Die FakeChannel bekommt OnStopRequest, die Tests beenden darin. Der Drain-Test bekommt 20 s statt 2 s Luft. AtomicFile schreibt, bis der Leser 20 Blicke hatte, statt fest 40 Mal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e42ec100b0
commit
753d633cf3
@@ -172,9 +172,18 @@ internal sealed class FakeChannel : IInstanceChannel
|
||||
: Answer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// #722: What the instance does when the request arrives — typically: end. A test that
|
||||
/// ended the process before asking raced the supervisor's own check: under load the check
|
||||
/// saw the process gone first and called it a crash, not a stop.
|
||||
/// </summary>
|
||||
public Action<string>? OnStopRequest { get; set; }
|
||||
|
||||
public Task<bool> RequestStopAsync(string instanceDirectory, CancellationToken ct = default)
|
||||
{
|
||||
StopRequests++;
|
||||
if (StopRequestArrives)
|
||||
OnStopRequest?.Invoke(instanceDirectory);
|
||||
return Task.FromResult(StopRequestArrives);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user