Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Mar 8, 2025
1 parent b16465e commit ea48b65
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion object_store/src/client/http/spawn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,15 @@ mod tests {
let (send, recv) = tokio::sync::oneshot::channel();

let mock = MockServer::new().await;
mock.push(Response::new("BANANAS".to_string()));

let url = mock.url().to_string();
let thread = std::thread::spawn(|| {
futures::executor::block_on(async move {
let retry = RetryConfig::default();
let _ = client.get(url).send_retry(&retry).await.unwrap();
let ret = client.get(url).send_retry(&retry).await.unwrap();
let payload = ret.into_body().bytes().await.unwrap();
assert_eq!(payload.as_ref(), b"BANANAS");
let _ = send.send(());
})
});
Expand Down

0 comments on commit ea48b65

Please sign in to comment.