diff options
| author | Kunal Mohan <kunalmohan99@gmail.com> | 2021-03-24 15:34:53 +0530 |
|---|---|---|
| committer | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-04 20:47:52 +0530 |
| commit | e30ec5745ef1f5526a05be1f49fed7b406558805 (patch) | |
| tree | 5467fd236cc135d754352a0f49bcf69f38f8d1fb /src/tests | |
| parent | Some documentation an ClientOsApi stuff (diff) | |
| download | sl0ppij-e30ec5745ef1f5526a05be1f49fed7b406558805.tar.gz sl0ppij-e30ec5745ef1f5526a05be1f49fed7b406558805.tar.xz sl0ppij-e30ec5745ef1f5526a05be1f49fed7b406558805.zip | |
Add router thread on server side as well
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/fakes.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tests/fakes.rs b/src/tests/fakes.rs index 43d100bf..32dde38f 100644 --- a/src/tests/fakes.rs +++ b/src/tests/fakes.rs @@ -7,11 +7,10 @@ use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{mpsc, Arc, Mutex}; use std::time::{Duration, Instant}; -use crate::common::{ - ChannelWithContext, ClientInstruction, SenderType, SenderWithContext, ServerInstruction, -}; +use crate::common::{ChannelWithContext, ClientInstruction, SenderType, SenderWithContext}; use crate::errors::ErrorContext; use crate::os_input_output::{ClientOsApi, ServerOsApi}; +use crate::server::ServerInstruction; use crate::tests::possible_tty_inputs::{get_possible_tty_inputs, Bytes}; use crate::utils::shared::default_palette; use zellij_tile::data::Palette; @@ -256,8 +255,8 @@ impl ServerOsApi for FakeInputOutput { self.io_events.lock().unwrap().push(IoEvent::Kill(fd)); Ok(()) } - fn send_to_server(&mut self, msg: ServerInstruction) { - self.server_sender.send(msg).unwrap(); + fn server_exit(&mut self) { + self.server_sender.send(ServerInstruction::Exit).unwrap(); } fn server_recv(&self) -> (ServerInstruction, ErrorContext) { self.server_receiver.lock().unwrap().recv().unwrap() |
