feat(app): add stdin-managed client target sets
This commit is contained in:
1 parent
31fd76f78d
commit
1ba4f61072
7 files changed
+704
-14
No files matched your search
@@ -1576,6 +1576,37 @@ fn authenticated_peer_close_outcome() {
|
||||
assert!(!has_close(&records));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn peer_close_leaves_other_explicitly_managed_targets_running() {
|
||||
let closing = start_server(ServerBehavior::PeerClose, None);
|
||||
let continuing = start_server(ServerBehavior::Echo, None);
|
||||
let mut managed = config(ManagedPacing::Staggered);
|
||||
managed.completion = ManagedCompletionPolicy::ExplicitStop;
|
||||
managed.client.duration = None;
|
||||
let (task, handle) = ManagedClient::task(
|
||||
managed,
|
||||
vec![
|
||||
target("closing", closing.addr),
|
||||
target("continuing", continuing.addr),
|
||||
],
|
||||
)
|
||||
.unwrap();
|
||||
let runtime = runtime();
|
||||
let mut task = Box::pin(task);
|
||||
|
||||
drive_task_until(&runtime, &mut task, |task| {
|
||||
handle.status().peer_closed_target_outcomes == 1
|
||||
&& task.targets[1].counters.packets_sent != 0
|
||||
});
|
||||
assert_eq!(handle.status().lifecycle, ManagedLifecycle::Running);
|
||||
|
||||
let stop = handle.stop();
|
||||
runtime.block_on(task);
|
||||
runtime.block_on(stop);
|
||||
closing.finish();
|
||||
assert!(!probes(&continuing.finish()).is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn peer_close_during_stop_drain_remains_authoritative() {
|
||||
let key = b"managed-drain-peer-close".to_vec();
|
||||
|
||||
Reference in new issue
Block a user