Make Git router teardown process-bounded
This commit is contained in:
parent
31e9ab0f2d
commit
e60baad993
1 changed files with 191 additions and 35 deletions
|
|
@ -1,10 +1,11 @@
|
|||
use super::{
|
||||
AttachedRunscSignal, CoordinatorId, Duration, Fixture, GenerationId, HOST_COORDINATOR_DRIVER,
|
||||
HostProcessOwnershipSlot, MatrixError, ParticipantState, Path, PathBuf, PidfsProcessIdentityV1,
|
||||
PlatformObservation, ProcessOwnershipCommitAck, ProcessOwnershipContext, RetainedProcess,
|
||||
SandboxCoordinator, Signal, TargetCommand, UnixListener, check_platform, child_broker,
|
||||
current_process_identity, fs, host_path, networked_sandbox_view_isolated, read_start_time,
|
||||
sandbox_participant, thread, unreachable_permitted_destination_does_not_block_start,
|
||||
AttachedRunscSignal, CoordinatorId, Duration, Fixture, GenerationId, GitRoutingCoordinator,
|
||||
HOST_COORDINATOR_DRIVER, HostProcessOwnershipSlot, MatrixError, ParticipantRole,
|
||||
ParticipantState, Path, PathBuf, PidfsProcessIdentityV1, PlatformObservation,
|
||||
ProcessOwnershipCommitAck, ProcessOwnershipContext, RetainedProcess, SandboxCoordinator,
|
||||
Signal, TargetCommand, UnixListener, check_platform, child_broker, current_process_identity,
|
||||
fs, host_path, networked_sandbox_view_isolated, read_start_time, sandbox_participant, thread,
|
||||
unreachable_permitted_destination_does_not_block_start,
|
||||
};
|
||||
|
||||
pub(super) fn run_handoff_matrix() -> Result<(), MatrixError> {
|
||||
|
|
@ -175,6 +176,32 @@ pub(super) fn normal_stop_and_stop_resume() -> Result<(), MatrixError> {
|
|||
assert_activity_stable(&fixture.activity)
|
||||
}
|
||||
|
||||
pub(super) fn git_routing_clean_stop() -> Result<(), MatrixError> {
|
||||
let fixture = Fixture::new_git_routed()?;
|
||||
let mut runtime = fixture.launch_committed()?;
|
||||
wait_for_activity(&fixture.activity)?;
|
||||
runtime
|
||||
.stop_sandbox(&SandboxCoordinator::new(&fixture.store))
|
||||
.map_err(failure)?;
|
||||
runtime
|
||||
.stop_git_routing(&GitRoutingCoordinator::new(&fixture.store))
|
||||
.map_err(failure)?;
|
||||
runtime.graceful_exit().map_err(failure)?;
|
||||
let snapshot = fixture.store.snapshot().map_err(failure)?;
|
||||
for role in [ParticipantRole::Sandbox, ParticipantRole::GitRouting] {
|
||||
assert_eq!(
|
||||
snapshot
|
||||
.participants
|
||||
.iter()
|
||||
.find(|participant| participant.role() == role)
|
||||
.ok_or_else(|| failure(format!("{role:?} participant is absent")))?
|
||||
.state(),
|
||||
ParticipantState::Clean
|
||||
);
|
||||
}
|
||||
assert_activity_stable(&fixture.activity)
|
||||
}
|
||||
|
||||
pub(super) fn attached_runsc_loss_stops_guest() -> Result<(), MatrixError> {
|
||||
let fixture = Fixture::new()?;
|
||||
let mut runtime = fixture.launch_committed()?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue