Skip to content

Commit

Permalink
fix send file test (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmaSd authored Feb 22, 2021
1 parent bab9ce3 commit be146fc
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tests/send_file.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![cfg(feature = "ui-test")]

use termchat::application::{Application, Event, Config};
use termchat::application::{Application, Event};
use termchat::config::Config;
use message_io::events::EventSender;

#[test]
Expand All @@ -14,18 +15,8 @@ fn send_file() {
std::fs::write(&test_path, &data).unwrap();

// spawn users
let config1: Config = Config {
discovery_addr: "238.255.0.1:5877".parse().unwrap(),
tcp_server_port: "0".parse().unwrap(),
user_name: 1.to_string(),
terminal_bell: false,
};
let config2: Config = Config {
discovery_addr: "238.255.0.1:5877".parse().unwrap(),
tcp_server_port: "0".parse().unwrap(),
user_name: 2.to_string(),
terminal_bell: false,
};
let config1: Config = Config { user_name: 1.to_string(), ..Config::default() };
let config2: Config = Config { user_name: 2.to_string(), ..Config::default() };
let (mut s1, t1) = test_user(config1);
// wait a bit or termchat will creates two-communication channels at the same time
std::thread::sleep(std::time::Duration::from_millis(100));
Expand Down

0 comments on commit be146fc

Please sign in to comment.