Make integration tests less flaky
- Send sigterm to Xwayland after the test has completed - Before polling for a new event, try to just grab one from xcb Fixes #118
This commit is contained in:
parent
caf88fcb45
commit
f459c604f5
2 changed files with 32 additions and 25 deletions
|
|
@ -41,7 +41,7 @@ pub trait RunData {
|
|||
}
|
||||
fn created_server(&self) {}
|
||||
fn connected_server(&self) {}
|
||||
fn xwayland_ready(&self, _display: String) {}
|
||||
fn xwayland_ready(&self, _display: String, _pid: u32) {}
|
||||
}
|
||||
|
||||
pub fn main(data: impl RunData) -> Option<()> {
|
||||
|
|
@ -75,6 +75,8 @@ pub fn main(data: impl RunData) -> Option<()> {
|
|||
.spawn()
|
||||
.unwrap();
|
||||
|
||||
let xwl_pid = xwayland.id();
|
||||
|
||||
let (mut finish_tx, mut finish_rx) = UnixStream::pair().unwrap();
|
||||
let stderr = xwayland.stderr.take().unwrap();
|
||||
std::thread::spawn(move || {
|
||||
|
|
@ -151,7 +153,7 @@ pub fn main(data: impl RunData) -> Option<()> {
|
|||
display.pop();
|
||||
display.insert(0, ':');
|
||||
info!("Connected to Xwayland on {display}");
|
||||
data.xwayland_ready(display);
|
||||
data.xwayland_ready(display, xwl_pid);
|
||||
xstate.server_state_setup(&mut server_state);
|
||||
|
||||
#[cfg(feature = "systemd")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue