0.3.15-pre.010-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/unit_tests/snapshot.rs
|
||||
// version: 7
|
||||
// version: 8
|
||||
|
||||
fn snapshot_foundation_with_source_total(
|
||||
source_total: usize,
|
||||
@@ -346,3 +346,24 @@ fn v0_3_14_pre_011_snapshot_carries_checked_gap_observability() {
|
||||
assert_eq!(snapshot.oldest_open_gap_start_slot(), std::option::Option::Some(100));
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_15_pre_010_public_continuity_health_getters_are_source_neutral() {
|
||||
let (mut publisher, source) = match snapshot_foundation_with_source_total(2) {
|
||||
std::option::Option::Some(value) => value,
|
||||
std::option::Option::None => return,
|
||||
};
|
||||
let projection = crate::RawTransactionIngestProcessingFrontierProjection::new(0, std::option::Option::Some(90), std::option::Option::None)
|
||||
.with_source_continuity(std::option::Option::Some(crate::RawTransactionIngestSourceState::Active), 1, 1, 0)
|
||||
.with_source_counts(2, 2, 0, 0)
|
||||
.with_continuity_health(std::option::Option::Some(90), false, true)
|
||||
.with_failed_source_losses_reconciled(true);
|
||||
assert!(publisher.record_processing_frontier(ksp_worker_api::WorkerState::Running, 0, 0, projection).is_ok());
|
||||
let snapshot = source.current();
|
||||
assert!(snapshot.continuity_policy_observed());
|
||||
assert_eq!(snapshot.continuity_frontier_slot(), std::option::Option::Some(90));
|
||||
assert!(!snapshot.continuity_has_open_gaps());
|
||||
assert!(snapshot.failed_source_losses_reconciled());
|
||||
assert!(snapshot.future_target_coverage());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user