Skip to content

Adjust and enable 5 out of 11 ExecutionProfile integration tests #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

muzarski
Copy link
Collaborator

Ref: #132

Enabled tests:

  • InvalidName
  • RequestTimeout
  • Consistency
  • SerialConsistency
  • LatencyAwareRouting

Tests that we could not enable (yet):

  • RetryPolicy <- this one requires to implement cass_retry_policy_logging_new
  • RoundRobin <- requires cass_future_coordinator
  • TokenAwareRouting <- currently requires cass_statement_set_key_index and cass_statement_set_keyspace. These are not going to be supported by rust-driver (most probably). I'll need to investigate if the test could be rewritten using prepared statements. If so, this will be a part of separate PR.
  • BlacklistFiltering <- requires cass_[cluster/execution_profile]_set_blacklist_filtering
  • WhitelistFiltering <- cass_[cluster/execution_profile]_set_whitelist_filtering
  • SpeculativeExecutionPolicy <- it throws some error related to UDFs. Need to be investigated. However, it also requires a testing utility to get all of the attempted hosts from the result. This could be probably implemented using HistoryListener.

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 implemented Rust unit tests for the features/changes introduced.
  • I have enabled appropriate tests in .github/workflows/build.yml in gtest_filter.
  • I have enabled appropriate tests in .github/workflows/cassandra.yml in gtest_filter.

1. This test entry was placed after "-" sign. The tests after
this are excluded (explicitly disabled).

2. The syntax for test filter was just wrong. "ExecutionProfileTest.InvalidName"
did not pick up anything.
Analogous method is already present for CassStatement.
This test sets a low (1ms) request timeout using "request_timeout" execution profile.
It expects a request timeout error.

It is adjusted, so we simulate the 2>=ms latency for the requests. Otherwise,
this test is too flaky - especially in the local setup.
I modified the test by a lot. The idea behind this is explained
in the comment. TLDR - we expect setting bad serial consistency to fail
on client side, not on the server side.

I left original test case commented for reference.
We just needed to adjust the log filter criteria to match the logs
emitted by rust-driver.
@muzarski muzarski self-assigned this Apr 28, 2025
@muzarski muzarski added area/testing Related to unit/integration testing CI Related to continuous integration labels Apr 28, 2025
@muzarski muzarski added this to the 0.5 milestone Apr 28, 2025
@muzarski muzarski requested review from wprzytula and Lorak-mmk April 28, 2025 15:45
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.

1 participant