Skip to content

Commit 645e57e

Browse files
committed
test(desktop): wait for Windows sign-in console cleanup
Modern ClosePseudoConsole returns asynchronously. Keep the native fixture deadline around its output reader reaching EOF before removing the test executable. Refs FOR-308
1 parent 5757600 commit 645e57e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

desktop/src-tauri/src/plan.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,15 @@ mod tests {
802802
signing.child.try_wait().unwrap().is_none(),
803803
"the login child must survive until the code can be supplied"
804804
);
805+
let draining = std::sync::Arc::downgrade(&signing.output);
805806
signing.stop();
806807
drop(signing);
808+
// Modern ClosePseudoConsole returns before its clients disconnect. The
809+
// reader's EOF, not the master's drop, marks completed console cleanup.
810+
// Keep this inside the deadline before deleting the fixture executable.
811+
while draining.strong_count() != 0 {
812+
std::thread::sleep(Duration::from_millis(10));
813+
}
807814
Ok::<_, String>(())
808815
})();
809816
let _ = sent.send(result);

0 commit comments

Comments
 (0)