Improve v2 SDK test robustness and failure diagnostics - #1325
Improve v2 SDK test robustness and failure diagnostics#1325RafaelPChequer wants to merge 7 commits into
Conversation
|
|
|
||
| if (audioLevel !== undefined && audioLevel !== null) { | ||
| console.log(`Using audioLevel as fallback: ${audioLevel}`) | ||
| expect(audioLevel).toBeGreaterThan(minTotalAudioEnergy / 10) // audioLevel is typically higher than totalAudioEnergy |
There was a problem hiding this comment.
I don't understand this part - audioLevel is the current level of the audio. It could be zero if there's silence. Why would we need to expect it higher than 10% of the expected minimum total audio energy?
(also the comment is not consistent with the code)
Description
Enhanced end-to-end tests for v2 WebRTC in the SDK by introducing retry mechanisms for call creation and active status checks, implementing call stability monitoring to ensure consistent call states over time, and adding fallback validations for audio metrics using audioLevel when totalAudioEnergy is unavailable (common in certain codec scenarios). These improvements boost test robustness, provide better diagnostics for intermittent failures, and reduce flakiness in network-dependent tests like TURN connections.
Type of change
Code snippets
In case of new feature or breaking changes, please include code snippets.