Skip to content

IT: migrate RequestTimeout test to Rust using proxy - #493

Merged
wprzytula merged 1 commit into
scylladb:masterfrom
wprzytula:fight-test-request-timeout-flakiness
Aug 7, 2026
Merged

IT: migrate RequestTimeout test to Rust using proxy#493
wprzytula merged 1 commit into
scylladb:masterfrom
wprzytula:fight-test-request-timeout-flakiness

Conversation

@wprzytula

Copy link
Copy Markdown
Contributor

Fixes: #309

The ExecutionProfileTest.RequestTimeout has been flaky in the CI for long. This commit rewrites it using scylla-proxy in a reliable way, avoiding races. It's now run as a "unit test", because it no longer needs the real cluster. The original test is left as-is, but it's no longer run in the CI.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have provided docstrings for the public items that I want to introduce.
  • [ ] I have adjusted the documentation in ./docs/source/.
  • I have implemented Rust unit tests for the features/changes introduced. -> migrated the test.
  • I have enabled appropriate tests in Makefile in {SCYLLA,CASSANDRA}_(NO_VALGRIND_)TEST_FILTER. -> disabled the replaced test.
  • I added appropriate Fixes: annotations to PR description.

@wprzytula
wprzytula requested a balanced review from Copilot August 6, 2026 16:15
@wprzytula wprzytula self-assigned this Aug 6, 2026
@wprzytula wprzytula added CI Related to continuous integration area/testing Related to unit/integration testing labels Aug 6, 2026
@wprzytula
wprzytula requested a review from Lorak-mmk August 6, 2026 16:15
@wprzytula wprzytula added this to the 1.1.1 milestone Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: QUIET

Plan: Pro Plus

Run ID: 8f6b63cf-8d5f-4146-850e-742eb36fd53b

📥 Commits

Reviewing files that changed from the base of the PR and between 2a49017 and d6fa73b.

📒 Files selected for processing (4)
  • Makefile
  • scylla-rust-wrapper/tests/integration/main.rs
  • scylla-rust-wrapper/tests/integration/request_timeout.rs
  • tests/src/integration/tests/test_exec_profile.cpp
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • scylladb/scylladb (auto-detected)

📝 Walkthrough

Walkthrough

The PR adds a proxy-based Rust integration test for execution-profile request timeouts. The test covers statements and batches, validates server errors for unprofiled requests, and validates client timeout errors for profiled requests. It registers the test module and adds the test to the default Scylla and Cassandra filters. The previous C++ test documents the migration and CI exclusion.

Sequence Diagram(s)

sequenceDiagram
  participant Test
  participant CDriver
  participant ScyllaProxy
  participant Cluster
  Test->>CDriver: Configure cluster and execution profile
  CDriver->>ScyllaProxy: Send statement and batch requests
  ScyllaProxy->>Cluster: Forward handshakes and metadata requests
  ScyllaProxy-->>CDriver: Return server errors or drop frames
  CDriver-->>Test: Report server errors or request timeouts
Loading

Suggested reviewers: lorak-mmk, dkropachev

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: migrating the request-timeout integration test to Rust with a proxy.
Description check ✅ Passed The description explains the failure, the proxy-based migration, CI behavior, and completes the required checklist.
Linked Issues check ✅ Passed The proxy-based Rust test directly addresses issue #309 by avoiding the race that causes unexpected request-timeout errors.
Out of Scope Changes check ✅ Passed The Makefile, Rust integration test, module declaration, and C++ test note all support the linked issue and PR objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.

🟡 Other comments (1)
tests/src/integration/tests/test_exec_profile.cpp-248-250 (1)

248-250: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the migration path.

Line 249 omits the integration directory. Use scylla-rust-wrapper/tests/integration/request_timeout.rs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/src/integration/tests/test_exec_profile.cpp` around lines 248 - 250,
Update the migration note in test_exec_profile.cpp to reference
scylla-rust-wrapper/tests/integration/request_timeout.rs, preserving the
existing statement about the test’s relocation and CI status.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Other comments:
In `@tests/src/integration/tests/test_exec_profile.cpp`:
- Around line 248-250: Update the migration note in test_exec_profile.cpp to
reference scylla-rust-wrapper/tests/integration/request_timeout.rs, preserving
the existing statement about the test’s relocation and CI status.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: QUIET

Plan: Pro Plus

Run ID: fb2582fa-2cdf-40a2-8ab5-229be7a5ea3c

📥 Commits

Reviewing files that changed from the base of the PR and between 2a49017 and 6a73724.

📒 Files selected for processing (4)
  • Makefile
  • scylla-rust-wrapper/tests/integration/main.rs
  • scylla-rust-wrapper/tests/integration/request_timeout.rs
  • tests/src/integration/tests/test_exec_profile.cpp
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • scylladb/scylladb (auto-detected)

Copilot AI left a comment

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.

Pull request overview

Migrates the flaky request-timeout coverage to a deterministic Rust proxy test without requiring a real cluster.

Changes:

  • Adds statement and batch execution-profile timeout tests using dropped proxy responses.
  • Registers the Rust test module.
  • Excludes the legacy C++ test from CI cluster runs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/src/integration/tests/test_exec_profile.cpp Documents the test migration.
scylla-rust-wrapper/tests/integration/request_timeout.rs Adds deterministic proxy-based timeout coverage.
scylla-rust-wrapper/tests/integration/main.rs Registers the new test module.
Makefile Excludes the flaky legacy test from cluster suites.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/src/integration/tests/test_exec_profile.cpp Outdated
The ExecutionProfileTest.RequestTimeout has been flaky in the CI for
long. This commit rewrites it using scylla-proxy in a reliable way,
avoiding races. It's now run as a "unit test", because it no longer
needs the real cluster. The original test is left as-is, but it's no
longer run in the CI.
@wprzytula
wprzytula force-pushed the fight-test-request-timeout-flakiness branch from 6a73724 to d6fa73b Compare August 6, 2026 16:21
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai
coderabbitai Bot requested a review from dkropachev August 6, 2026 16:21
@wprzytula
wprzytula merged commit 7acd807 into scylladb:master Aug 7, 2026
15 of 21 checks passed
@wprzytula
wprzytula deleted the fight-test-request-timeout-flakiness branch August 7, 2026 10:43
@wprzytula wprzytula mentioned this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Related to unit/integration testing CI Related to continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExecutionProfileTest.Integration_Cassandra_RequestTimeout can fail

3 participants