v0.3.11-pre.009
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/unit_tests/admission.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
fn material(
|
||||
network: &str,
|
||||
@@ -239,3 +239,24 @@ fn pre_006_network_guards_reject_ingress_or_material_mismatch_without_echoing_va
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "current_thread")]
|
||||
async fn pre_009_full_queue_dequeue_marks_source_neutral_backpressure_observation() {
|
||||
let (network, material) = match material("mainnet", 13, "AQID") {
|
||||
std::option::Option::Some(value) => value,
|
||||
std::option::Option::None => return,
|
||||
};
|
||||
let provenance = match provenance() {
|
||||
std::option::Option::Some(value) => value,
|
||||
std::option::Option::None => return,
|
||||
};
|
||||
let (mut admission, sender) = crate::RawTransactionAdmission::new(1);
|
||||
let ingress = crate::RawTransactionIngress { material, network, provenance, source_key: [13; 32] };
|
||||
assert!(sender.send(ingress).await.is_ok());
|
||||
assert!(admission.receive().await.is_some());
|
||||
assert!(admission.take_backpressure_wait_observed());
|
||||
admission.close();
|
||||
assert!(admission.receive().await.is_none());
|
||||
assert!(!admission.take_backpressure_wait_observed());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user