Implement native asset pipeline and cache (#64)
Some checks failed
Native code generation / deterministic (push) Failing after 2m18s
Imaging and meshing gate / native (push) Failing after 1m30s
JPEG 2000 feature / linux (push) Successful in 2m40s
Native Rust workspace compile / compile (push) Failing after 57s
Skia feature / linux (push) Successful in 31m8s
Some checks failed
Native code generation / deterministic (push) Failing after 2m18s
Imaging and meshing gate / native (push) Failing after 1m30s
JPEG 2000 feature / linux (push) Successful in 2m40s
Native Rust workspace compile / compile (push) Failing after 57s
Skia feature / linux (push) Successful in 31m8s
This commit is contained in:
@@ -600,14 +600,17 @@ async fn download_manager_retries_transient_but_not_permanent_statuses() {
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn deduplicated_subscriber_cancellation_cancels_the_shared_download() {
|
||||
async fn deduplicated_subscriber_cancellation_is_independent() {
|
||||
let attempts = Arc::new(AtomicUsize::new(0));
|
||||
let handler_attempts = Arc::clone(&attempts);
|
||||
let handler = HttpMessageHandler::new(move |_request, cancellation| {
|
||||
let release = Arc::new(tokio::sync::Notify::new());
|
||||
let handler_release = Arc::clone(&release);
|
||||
let handler = HttpMessageHandler::new(move |_request, _cancellation| {
|
||||
handler_attempts.fetch_add(1, Ordering::AcqRel);
|
||||
let release = Arc::clone(&handler_release);
|
||||
async move {
|
||||
cancellation.cancelled().await;
|
||||
response(200, b"too late".to_vec())
|
||||
release.notified().await;
|
||||
response(200, b"shared".to_vec())
|
||||
}
|
||||
});
|
||||
let mut client = GridClient::new().expect("client");
|
||||
@@ -645,8 +648,12 @@ async fn deduplicated_subscriber_cancellation_cancels_the_shared_download() {
|
||||
tokio::task::yield_now().await;
|
||||
}
|
||||
cancellation.cancel();
|
||||
assert_eq!(first.await.expect("first task"), Err(Error::Cancelled));
|
||||
assert_eq!(second.await.expect("second task"), Err(Error::Cancelled));
|
||||
release.notify_waiters();
|
||||
assert_eq!(
|
||||
first.await.expect("first task").expect("first download").1,
|
||||
b"shared"
|
||||
);
|
||||
assert_eq!(attempts.load(Ordering::Acquire), 1);
|
||||
downloads.dispose().expect("dispose");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user