Skip to content

[8.4] [MOD-12701] Enforce a per-test timeout in the C++ rstest suite using ctest#7713

Merged
redisearch-backport-pull-request[bot] merged 1 commit into8.4from
backport-7588-to-8.4
Dec 10, 2025
Merged

[8.4] [MOD-12701] Enforce a per-test timeout in the C++ rstest suite using ctest#7713
redisearch-backport-pull-request[bot] merged 1 commit into8.4from
backport-7588-to-8.4

Conversation

@redisearch-backport-pull-request
Copy link
Contributor

@redisearch-backport-pull-request redisearch-backport-pull-request bot commented Dec 10, 2025

Description

Backport of #7588 to 8.4.


Note

Switches C++ test execution to ctest with gtest_discover_tests (300s per-test timeout), updates the unit test runner to use/parse ctest output, and skips several slow/flaky tests.

  • Tests infrastructure:
    • C++ tests runner (sbin/unit-tests): Execute C++ suites via ctest (including single-test -R), add log handling and parsing of CTest output (PASS/FAIL/SKIPPED/TIMEOUT), and mirror behavior for coordinator tests; retain GDB path.
  • CMake (CTest integration):
    • tests/cpptests/CMakeLists.txt: Use include(GoogleTest) and gtest_discover_tests(rstest) with per-test TIMEOUT 300 (replacing add_test).
    • tests/cpptests/coord_tests/CMakeLists.txt: Same for rstest_coord with TIMEOUT 300.
  • Tests adjustments:
    • Skip long/unstable tests with GTEST_SKIP():
      • IORuntimeCtxCommonTest.ActiveIoThreadsMetric (coverage slowdown).
      • RangeTest.testRangeIterator, RangeTest.testRangeIteratorMulti.
      • RangeIndexTest.testNumericTreeMemory, RangeIndexTest.testNumericTreeOverhead (ctest-only failures).
    • In FGCTestTag.testPipeErrorDuringApply: skip on macOS; reduce iterations (step by 2).

Written by Cursor Bugbot for commit e0132b0. This will update automatically on new commits. Configure here.

…ctest (#7588)

* Enforce a per-test timeout in the C++ rstest suite using ctest

* Disable problematic tests

* Raise timeout to 60s

* Raise timeout

* Add a timeout for coordinator tests too

* Skip ActivateIoThreadsMetric test

(cherry picked from commit 19c436d)
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.94%. Comparing base (f015999) to head (e0132b0).
⚠️ Report is 2 commits behind head on 8.4.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #7713      +/-   ##
==========================================
- Coverage   85.95%   85.94%   -0.01%     
==========================================
  Files         331      331              
  Lines       52886    52886              
  Branches    11998    11998              
==========================================
- Hits        45456    45455       -1     
- Misses       7263     7264       +1     
  Partials      167      167              
Flag Coverage Δ
flow 84.52% <ø> (-0.09%) ⬇️
unit 52.45% <ø> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@redisearch-backport-pull-request redisearch-backport-pull-request bot added this pull request to the merge queue Dec 10, 2025
Merged via the queue into 8.4 with commit 110b767 Dec 10, 2025
34 checks passed
@redisearch-backport-pull-request redisearch-backport-pull-request bot deleted the backport-7588-to-8.4 branch December 10, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant