Skip to content

[BUG] [Python tests][WebRTC] WEBRTCP test cases leak CurrentSessions across sequential runs #73660

Description

@xuzh-reolink

Reproduction steps

Several TC_WEBRTCP_2_x Python tests create WebRTC sessions but do not
send WebRTCTransportProvider.EndSession on the successful path.

When the tests are run sequentially against the same DUT, the following
test fails its CurrentSessions == [] precondition.

Affected tests without EndSession:
2.1, 2.3, 2.4, 2.7, 2.8, 2.13, 2.14, 2.15,
2.27, 2.29, 2.30 and 2.32.

Tests with incomplete multi-session cleanup:
2.5, 2.12, 2.16 and 2.31.

Suggested fix:
Add reusable cleanup to TC_WEBRTCPTestBase, track every session created
by the test, and send EndSession for each tracked session from a finally
or teardown path. This should also run when a later assertion fails.

Bug prevalence

everytime

GitHub hash of the SDK that was being used

b91b83f

Platform

linux

Platform Version(s)

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions