Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/client_h3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ pub async fn work_with_qps_latency_correction(
) {
let (tx, rx) = kanal::unbounded();

let _work_queue = async move {
let work_queue = async move {
match query_limit {
QueryLimit::Qps(qps) => {
let start = std::time::Instant::now();
Expand Down Expand Up @@ -772,6 +772,7 @@ pub async fn work_with_qps_latency_correction(
None,
)
.await;
work_queue.await.unwrap();
for f in futures {
let _ = f.await;
}
Expand Down
20 changes: 20 additions & 0 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,26 @@ async fn test_ipv6() {
rx.try_recv().unwrap().unwrap();
}

#[apply(test_all_http_versions)]
#[tokio::test]
async fn test_latency_correction(http_version_param: &str) {
tokio::time::timeout(
std::time::Duration::from_secs(10),
get_req(
"/",
&[
"-q",
"10",
"--latency-correction",
"--http-version",
http_version_param,
],
),
)
.await
.expect("oha did not finish");
}

#[tokio::test]
async fn test_query_limit() {
// burst 10 requests with delay of 2s and rate of 4
Expand Down
Loading