Skip to content

Commit

Permalink
chore(test): sleep 5s before requesting
Browse files Browse the repository at this point in the history
  • Loading branch information
lomirus committed Dec 20, 2023
1 parent bf502c8 commit 69685b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use std::time::Duration;

use live_server::listen;
use reqwest::StatusCode;
use tokio::time::sleep;

#[tokio::test]
async fn request() {
Expand All @@ -9,6 +12,8 @@ async fn request() {
.unwrap();
});

sleep(Duration::from_secs(5)).await;

// Test requesting index.html
let response = reqwest::get("http://127.0.0.1:8000").await.unwrap();

Expand Down

0 comments on commit 69685b2

Please sign in to comment.