cultmesh-rs tests: a request-less error faults the outstanding subscribe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1f4bd83ab3
commit
92281a5a47
1 changed files with 11 additions and 0 deletions
|
|
@ -337,6 +337,17 @@ fn an_error_answering_a_subscribe_is_a_fault_and_only_a_recognised_text_is_quote
|
|||
assert_eq!(faulted(&events[0]), "CultNet subscription 'sub-1' was refused by the peer.");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_error_without_a_request_id_faults_the_outstanding_subscribe() {
|
||||
let peer = Peer::start();
|
||||
let client = CultMeshRudpSubscriptionClient::connect(options(&peer)).unwrap();
|
||||
client.subscribe("sub-1", vector_selection()).unwrap();
|
||||
peer.subscribe_id();
|
||||
peer.send(&CultNetMessage::Error { error: "the snapshot source failed".into(), code: None, details: None });
|
||||
let events = drain_events(&client, 1);
|
||||
assert_eq!(faulted(&events[0]), "CultNet subscription was refused by the peer: the snapshot source failed.");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_error_for_something_else_leaves_the_subscription_alone() {
|
||||
let peer = Peer::start();
|
||||
|
|
|
|||
Loading…
Reference in a new issue