v0.2.7-pre.011
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-onchain-transport-lib/unit_tests/ws_lifecycle.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
fn non_zero(value: u64) -> std::num::NonZeroU64 {
|
||||
return std::num::NonZeroU64::new(value).expect("test ID must be non-zero");
|
||||
@@ -105,3 +105,21 @@ fn websocket_subscription_kinds_map_exact_standard_method_triplets() {
|
||||
assert_eq!(kind.notification_method(), notification);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn websocket_unstable_subscription_partition_is_exact() {
|
||||
let cases = [
|
||||
(crate::WsSubscriptionKind::Account, false),
|
||||
(crate::WsSubscriptionKind::Block, true),
|
||||
(crate::WsSubscriptionKind::Logs, false),
|
||||
(crate::WsSubscriptionKind::Program, false),
|
||||
(crate::WsSubscriptionKind::Root, false),
|
||||
(crate::WsSubscriptionKind::Signature, false),
|
||||
(crate::WsSubscriptionKind::Slot, false),
|
||||
(crate::WsSubscriptionKind::SlotsUpdates, true),
|
||||
(crate::WsSubscriptionKind::Vote, true),
|
||||
];
|
||||
for (kind, unstable) in cases {
|
||||
assert_eq!(kind.is_unstable(), unstable);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user