joule-moq-relay test: the client closes after the relay holds its session (WebTransport close flake) #391
1 changed files with 4 additions and 0 deletions
|
|
@ -88,6 +88,10 @@ async fn run() {
|
|||
// A client closes its session with a code of its own: the relay reads it as the peer's,
|
||||
// and its summary records it; the client's own end reads its close as local.
|
||||
let (c, _) = connect(&rooms, Via::WebTransport, ClientOptions::default()).await;
|
||||
// The client has its handshake once the relay's SETUP arrives; the relay reads the
|
||||
// client's SETUP after sending its own, and a session closed before then was never served
|
||||
// and gets no summary. So the close waits until the relay holds the session.
|
||||
assert!(until(STEP, || rooms.relay().session_diagnostics().len() == 1).await, "the relay holds the session");
|
||||
c.close(SessionError::PROTOCOL_VIOLATION.0, "a client's own close");
|
||||
assert_eq!(
|
||||
closed(c.conn.as_ref(), "the client's close").await,
|
||||
|
|
|
|||
Loading…
Reference in a new issue