tests.integration.standard.test_prepared_statements:PreparedStatementTests.test_fail_if_different_query_id_on_reprepare() failing unexpectedly

Description

Observed in recent Jenkins builds:

 

--------------------- >> end captured logging << --------------------- Stacktrace File "/home/jenkins/.pyenv/versions/3.8.3/lib/python3.8/unittest/case.py", line 60, in testPartExecutor yield File "/home/jenkins/.pyenv/versions/3.8.3/lib/python3.8/unittest/case.py", line 676, in run self._callTestMethod(testMethod) File "/home/jenkins/.pyenv/versions/3.8.3/lib/python3.8/unittest/case.py", line 633, in _callTestMethod method() File "/home/jenkins/workspace/drivers_python_oss_master/tests/integration/standard/test_prepared_statements.py", line 408, in test_fail_if_different_query_id_on_reprepare self.session.execute(prepared, [0]) File "/home/jenkins/.pyenv/versions/3.8.3/lib/python3.8/unittest/case.py", line 227, in __exit__ self._raiseFailure("{} not raised".format(exc_name)) File "/home/jenkins/.pyenv/versions/3.8.3/lib/python3.8/unittest/case.py", line 164, in _raiseFailure raise self.test_case.failureException(msg) DriverException not raised -------------------- >> begin captured logging << --------------------

Environment

None

Pull Requests

None

Activity

Show:
Bret McGuire
March 9, 2023 at 2:47 PM
(edited)

Confirmed previous analysis:

  • 3.11.11 - test passes (no server-side fix)

  • 3.11.12 - test fails

  • 4.0.1 - test passes (no server-side fix)

  • 4.0.2 - test fails

 

Adding some version bounds around the test case in question should be enough to resolve this. With this change all four cases above pass as expected.

Bret McGuire
March 1, 2023 at 9:37 PM

Relevant test code is here. Note the reference to CASSANDRA-15252, which is highly relevant here. it looks like 15252 includes a server-side change to mitigate the effects which lead to the DriverException in the test above. The fix version for 15252 is marked as 3.11.12 and 4.0.2 so my guess is that if we run this test with 3.11.11 and 4.0.1 we’ll see the test pass (because the DriverException occurs) but if we move up on patch version we won’t. Jenkins uses the most recent version in a given major.minor line so it’s running with versions which would include this fix… and thus likely won’t exercise this bug.

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created February 28, 2023 at 9:46 PM
Updated March 10, 2023 at 4:28 PM
Resolved March 10, 2023 at 4:28 PM