Skip to content

support SimulateScenario through FFI to improve testing#1069

Merged
davidzhao merged 15 commits intomainfrom
dz/simulate-scenarios
May 10, 2026
Merged

support SimulateScenario through FFI to improve testing#1069
davidzhao merged 15 commits intomainfrom
dz/simulate-scenarios

Conversation

@davidzhao
Copy link
Copy Markdown
Member

@davidzhao davidzhao commented May 9, 2026

also fixed a few edge cases with connection resumption. added tests

@davidzhao davidzhao requested review from a team, ladvoc and theomonnom May 9, 2026 02:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Changeset

The following package versions will be affected by this PR:

Package Bump
livekit patch
livekit-ffi patch

github-actions Bot and others added 2 commits May 9, 2026 02:56
Support SimulateScenario through FFI to enhance testing capabilities.
@ladvoc ladvoc self-requested a review May 9, 2026 03:29
Comment thread livekit/src/room/mod.rs
Copy link
Copy Markdown
Contributor

@xianshijing-lk xianshijing-lk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work. it looks like a solid improvement, thanks for fixing the problems there.

one question and one nit.

inner.send(ping).await;
}
_ = &mut ping_timeout => {
let _ = emitter.send(SignalEvent::Close("ping timeout".into()));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an issue with this PR, but simply a question.

When a ping timeout happened, it emits SignalEvent::Close, exits the loop, then closes/removes the stream.

Is this an expected or documented behavior ? or should we try reconnecting instead ?

@davidzhao @ladvoc

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, this will exit the loop and the engine layer would trigger a resume.

Comment thread livekit-ffi/src/server/requests.rs Outdated
@davidzhao davidzhao merged commit f317f51 into main May 10, 2026
23 checks passed
@davidzhao davidzhao deleted the dz/simulate-scenarios branch May 10, 2026 04:34
@knope-bot knope-bot Bot mentioned this pull request May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants