v0.3.11-pre.009-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/unit_tests/admission.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
fn material(
|
||||
network: &str,
|
||||
@@ -251,12 +251,14 @@ async fn pre_009_full_queue_dequeue_marks_source_neutral_backpressure_observatio
|
||||
std::option::Option::None => return,
|
||||
};
|
||||
let (mut admission, sender) = crate::RawTransactionAdmission::new(1);
|
||||
let ingress = crate::RawTransactionIngress { material, network, provenance, source_key: [13; 32] };
|
||||
let ingress = crate::RawTransactionIngress { material, network: network.clone(), provenance, source_key: [13; 32] };
|
||||
assert!(sender.send(ingress).await.is_ok());
|
||||
assert!(admission.receive().await.is_some());
|
||||
let first = admission.receive(&network).await;
|
||||
assert!(matches!(first, std::result::Result::Ok(std::option::Option::Some(_))));
|
||||
assert!(admission.take_backpressure_wait_observed());
|
||||
admission.close();
|
||||
assert!(admission.receive().await.is_none());
|
||||
let second = admission.receive(&network).await;
|
||||
assert!(matches!(second, std::result::Result::Ok(std::option::Option::None)));
|
||||
assert!(!admission.take_backpressure_wait_observed());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user