Complete previous test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pierre HUBERT 2022-10-17 08:38:03 +02:00
parent fcc7f30e10
commit ccb3d36fae

View File

@ -10,6 +10,7 @@ use crate::test::bot_client::ClientEndResult;
use crate::test::play_utils::check_no_replay_on_hit; use crate::test::play_utils::check_no_replay_on_hit;
use crate::test::TestPort; use crate::test::TestPort;
use crate::utils::network_utils::wait_for_port; use crate::utils::network_utils::wait_for_port;
use crate::utils::time_utils::time;
#[tokio::test] #[tokio::test]
async fn invalid_port() { async fn invalid_port() {
@ -214,6 +215,8 @@ async fn check_fire_time_out() {
task::spawn_local(start_server(Args::for_test(TestPort::RandomCheckTimeout))); task::spawn_local(start_server(Args::for_test(TestPort::RandomCheckTimeout)));
wait_for_port(TestPort::RandomCheckTimeout.port()).await; wait_for_port(TestPort::RandomCheckTimeout.port()).await;
let start = time();
let mut did_skip_one = false; let mut did_skip_one = false;
let res = bot_client::BotClient::new(TestPort::RandomCheckTimeout.as_url()) let res = bot_client::BotClient::new(TestPort::RandomCheckTimeout.as_url())
.with_rules( .with_rules(
@ -228,7 +231,10 @@ async fn check_fire_time_out() {
.run_client() .run_client()
.await .await
.unwrap(); .unwrap();
assert!(matches!(res, ClientEndResult::Finished { .. })); assert!(matches!(res, ClientEndResult::Finished { .. }));
assert!(time() - start >= MIN_STRIKE_TIMEOUT);
}) })
.await; .await;
} }