From f9310624c4bf2b448855cdeb7ca00e3f2274499a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Mon, 8 Apr 2024 20:26:40 +0200 Subject: [PATCH 1/8] Add a test to check issue #1366 and use Debug mode --- .github/workflows/mediasoup-worker.yaml | 5 ++++ worker/test/src/RTC/TestNackGenerator.cpp | 32 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/.github/workflows/mediasoup-worker.yaml b/.github/workflows/mediasoup-worker.yaml index 6851658a8f..54483edaed 100644 --- a/.github/workflows/mediasoup-worker.yaml +++ b/.github/workflows/mediasoup-worker.yaml @@ -108,3 +108,8 @@ jobs: run: invoke -r worker test # TODO: Maybe fix this one day. if: runner.os != 'Windows' + + - name: MEDIASOUP_BUILDTYPE=Debug invoke -r worker test + run: MEDIASOUP_BUILDTYPE=Debug invoke -r worker test + # TODO: Maybe fix this one day. + if: runner.os != 'Windows' diff --git a/worker/test/src/RTC/TestNackGenerator.cpp b/worker/test/src/RTC/TestNackGenerator.cpp index bb9744188b..c9f025779d 100644 --- a/worker/test/src/RTC/TestNackGenerator.cpp +++ b/worker/test/src/RTC/TestNackGenerator.cpp @@ -139,6 +139,38 @@ void validate(std::vector& inputs) } }; +SCENARIO("ISSUE 1366: https://github.com/versatica/mediasoup/issues/1366") +{ + SECTION("absl::btree_set") + { + REQUIRE(RTC::SeqManager::IsSeqLowerThan(10000, 40000) == true); + REQUIRE(RTC::SeqManager::IsSeqLowerThan(40000, 60000) == true); + REQUIRE(RTC::SeqManager::IsSeqLowerThan(10000, 60000) == false); + } + + SECTION("std::set") + { + std::set::SeqLowerThan> recoveredList; + + recoveredList.insert(10000); + recoveredList.insert(40000); + recoveredList.insert(60000); + + REQUIRE(recoveredList.size() == 3); + } + + // SECTION("absl::btree_set") + // { + // absl::btree_set::SeqLowerThan> recoveredList; + + // recoveredList.insert(10000); + // recoveredList.insert(40000); + // recoveredList.insert(60000); + + // REQUIRE(recoveredList.size() == 3); + // } +} + SCENARIO("NACK generator", "[rtp][rtcp]") { SECTION("no NACKs required") From 8738379ad0b90b1baf08de56afc93977f6a9d29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Mon, 8 Apr 2024 22:47:35 +0200 Subject: [PATCH 2/8] next try --- .github/workflows/mediasoup-worker.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mediasoup-worker.yaml b/.github/workflows/mediasoup-worker.yaml index 54483edaed..6afbac0711 100644 --- a/.github/workflows/mediasoup-worker.yaml +++ b/.github/workflows/mediasoup-worker.yaml @@ -104,10 +104,10 @@ jobs: - name: invoke -r worker mediasoup-worker run: invoke -r worker mediasoup-worker - - name: invoke -r worker test - run: invoke -r worker test - # TODO: Maybe fix this one day. - if: runner.os != 'Windows' + # - name: invoke -r worker test + # run: invoke -r worker test + # # TODO: Maybe fix this one day. + # if: runner.os != 'Windows' - name: MEDIASOUP_BUILDTYPE=Debug invoke -r worker test run: MEDIASOUP_BUILDTYPE=Debug invoke -r worker test From 558500d97a88a76e94ce5693220c479259e2b409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Mon, 8 Apr 2024 23:25:37 +0200 Subject: [PATCH 3/8] another try --- .github/workflows/mediasoup-worker.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mediasoup-worker.yaml b/.github/workflows/mediasoup-worker.yaml index 6afbac0711..fa2f15d037 100644 --- a/.github/workflows/mediasoup-worker.yaml +++ b/.github/workflows/mediasoup-worker.yaml @@ -101,8 +101,11 @@ jobs: # TODO: Maybe fix this one day. if: runner.os != 'Windows' - - name: invoke -r worker mediasoup-worker - run: invoke -r worker mediasoup-worker + # - name: invoke -r worker mediasoup-worker + # run: invoke -r worker mediasoup-worker + + - name: MEDIASOUP_BUILDTYPE=Debug invoke -r worker mediasoup-worker + run: MEDIASOUP_BUILDTYPE=Debug invoke -r worker mediasoup-worker # - name: invoke -r worker test # run: invoke -r worker test From aafd57e799f08331f15ec102a376d20f8f3f2ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Tue, 9 Apr 2024 09:27:54 +0200 Subject: [PATCH 4/8] last attempt --- .github/workflows/mediasoup-worker.yaml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/mediasoup-worker.yaml b/.github/workflows/mediasoup-worker.yaml index fa2f15d037..463a3830f2 100644 --- a/.github/workflows/mediasoup-worker.yaml +++ b/.github/workflows/mediasoup-worker.yaml @@ -61,6 +61,7 @@ jobs: CXX: ${{ matrix.build.cxx }} MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' MEDIASOUP_LOCAL_DEV: 'true' + MEDIASOUP_BUILDTYPE: 'Debug' steps: - name: Checkout @@ -101,18 +102,10 @@ jobs: # TODO: Maybe fix this one day. if: runner.os != 'Windows' - # - name: invoke -r worker mediasoup-worker - # run: invoke -r worker mediasoup-worker + - name: invoke -r worker mediasoup-worker + run: invoke -r worker mediasoup-worker - - name: MEDIASOUP_BUILDTYPE=Debug invoke -r worker mediasoup-worker - run: MEDIASOUP_BUILDTYPE=Debug invoke -r worker mediasoup-worker - - # - name: invoke -r worker test - # run: invoke -r worker test - # # TODO: Maybe fix this one day. - # if: runner.os != 'Windows' - - - name: MEDIASOUP_BUILDTYPE=Debug invoke -r worker test - run: MEDIASOUP_BUILDTYPE=Debug invoke -r worker test + - name: invoke -r worker test + run: invoke -r worker test # TODO: Maybe fix this one day. if: runner.os != 'Windows' From 4e044479d3ec99f6494d2e0bf7bd22c5d827af9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Tue, 9 Apr 2024 09:32:23 +0200 Subject: [PATCH 5/8] last --- worker/test/src/RTC/TestNackGenerator.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/worker/test/src/RTC/TestNackGenerator.cpp b/worker/test/src/RTC/TestNackGenerator.cpp index c9f025779d..eba3e0007f 100644 --- a/worker/test/src/RTC/TestNackGenerator.cpp +++ b/worker/test/src/RTC/TestNackGenerator.cpp @@ -141,7 +141,7 @@ void validate(std::vector& inputs) SCENARIO("ISSUE 1366: https://github.com/versatica/mediasoup/issues/1366") { - SECTION("absl::btree_set") + SECTION("foo") { REQUIRE(RTC::SeqManager::IsSeqLowerThan(10000, 40000) == true); REQUIRE(RTC::SeqManager::IsSeqLowerThan(40000, 60000) == true); @@ -159,16 +159,16 @@ SCENARIO("ISSUE 1366: https://github.com/versatica/mediasoup/issues/1366") REQUIRE(recoveredList.size() == 3); } - // SECTION("absl::btree_set") - // { - // absl::btree_set::SeqLowerThan> recoveredList; + SECTION("absl::btree_set") + { + absl::btree_set::SeqLowerThan> recoveredList; - // recoveredList.insert(10000); - // recoveredList.insert(40000); - // recoveredList.insert(60000); + recoveredList.insert(10000); + recoveredList.insert(40000); + recoveredList.insert(60000); - // REQUIRE(recoveredList.size() == 3); - // } + REQUIRE(recoveredList.size() == 3); + } } SCENARIO("NACK generator", "[rtp][rtcp]") From d44195fc2e04dc245229a43f4abae6cf537aa75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Tue, 9 Apr 2024 09:43:52 +0200 Subject: [PATCH 6/8] fail-fast: false --- .github/workflows/mediasoup-worker.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mediasoup-worker.yaml b/.github/workflows/mediasoup-worker.yaml index 463a3830f2..74b4a36717 100644 --- a/.github/workflows/mediasoup-worker.yaml +++ b/.github/workflows/mediasoup-worker.yaml @@ -11,6 +11,7 @@ concurrency: jobs: ci: strategy: + fail-fast: false matrix: build: - os: ubuntu-20.04 From 76e025a894d85a9e6c44e96475ba1c83301f8f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Tue, 9 Apr 2024 10:01:22 +0200 Subject: [PATCH 7/8] Only std::set --- worker/test/src/RTC/TestNackGenerator.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/worker/test/src/RTC/TestNackGenerator.cpp b/worker/test/src/RTC/TestNackGenerator.cpp index eba3e0007f..de2002e657 100644 --- a/worker/test/src/RTC/TestNackGenerator.cpp +++ b/worker/test/src/RTC/TestNackGenerator.cpp @@ -159,16 +159,16 @@ SCENARIO("ISSUE 1366: https://github.com/versatica/mediasoup/issues/1366") REQUIRE(recoveredList.size() == 3); } - SECTION("absl::btree_set") - { - absl::btree_set::SeqLowerThan> recoveredList; + // SECTION("absl::btree_set") + // { + // absl::btree_set::SeqLowerThan> recoveredList; - recoveredList.insert(10000); - recoveredList.insert(40000); - recoveredList.insert(60000); + // recoveredList.insert(10000); + // recoveredList.insert(40000); + // recoveredList.insert(60000); - REQUIRE(recoveredList.size() == 3); - } + // REQUIRE(recoveredList.size() == 3); + // } } SCENARIO("NACK generator", "[rtp][rtcp]") From 7394897b76dfa039fefd86091bb1bc86f5e854be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Tue, 9 Apr 2024 10:14:03 +0200 Subject: [PATCH 8/8] absl::btree_set only --- worker/test/src/RTC/TestNackGenerator.cpp | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/worker/test/src/RTC/TestNackGenerator.cpp b/worker/test/src/RTC/TestNackGenerator.cpp index de2002e657..b4dfd359b5 100644 --- a/worker/test/src/RTC/TestNackGenerator.cpp +++ b/worker/test/src/RTC/TestNackGenerator.cpp @@ -148,20 +148,9 @@ SCENARIO("ISSUE 1366: https://github.com/versatica/mediasoup/issues/1366") REQUIRE(RTC::SeqManager::IsSeqLowerThan(10000, 60000) == false); } - SECTION("std::set") - { - std::set::SeqLowerThan> recoveredList; - - recoveredList.insert(10000); - recoveredList.insert(40000); - recoveredList.insert(60000); - - REQUIRE(recoveredList.size() == 3); - } - - // SECTION("absl::btree_set") + // SECTION("std::set") // { - // absl::btree_set::SeqLowerThan> recoveredList; + // std::set::SeqLowerThan> recoveredList; // recoveredList.insert(10000); // recoveredList.insert(40000); @@ -169,6 +158,17 @@ SCENARIO("ISSUE 1366: https://github.com/versatica/mediasoup/issues/1366") // REQUIRE(recoveredList.size() == 3); // } + + SECTION("absl::btree_set") + { + absl::btree_set::SeqLowerThan> recoveredList; + + recoveredList.insert(10000); + recoveredList.insert(40000); + recoveredList.insert(60000); + + REQUIRE(recoveredList.size() == 3); + } } SCENARIO("NACK generator", "[rtp][rtcp]")