scylladb / python-driver

ScyllaDB Python Driver, originally DataStax Python Driver for Apache Cassandra
https://python-driver.docs.scylladb.com
Apache License 2.0
70 stars 42 forks source link

`test_raise_error_on_prepared_statement_execution_dropped_table` is failing using `scylla-5.2` #289

Open vponomaryov opened 7 months ago

vponomaryov commented 7 months ago

The python driver matrix test called test_raise_error_on_prepared_statement_execution_dropped_table fails using scylla-5.2:

    <testcase classname="datastax_version_3.29.0_v3_tests.integration.standard.test_prepared_statements.PreparedStatementTests" name="test_raise_error_on_prepared_statement_execution_dropped_table" time="0.670">
      <failure message="AssertionError: InvalidRequest not raised">self = &lt;tests.integration.standard.test_prepared_statements.PreparedStatementTests testMethod=test_raise_error_on_prepared_statement_execution_dropped_table&gt;

    def test_raise_error_on_prepared_statement_execution_dropped_table(self):
        &quot;&quot;&quot;
        test for error in executing prepared statement on a dropped table

        test_raise_error_on_execute_prepared_statement_dropped_table tests that an InvalidRequest is raised when a
        prepared statement is executed after its corresponding table is dropped. This happens because if a prepared
        statement is invalid, the driver attempts to automatically re-prepare it on a non-existing table.

        @expected_errors InvalidRequest If a prepared statement is executed on a dropped table

        @since 2.6.0
        @jira_ticket PYTHON-207
        @expected_result InvalidRequest error should be raised upon prepared statement execution.

        @test_category prepared_statements
        &quot;&quot;&quot;

        self.session.execute(&quot;CREATE TABLE test3rf.error_test (k int PRIMARY KEY, v int)&quot;)
        prepared = self.session.prepare(&quot;SELECT * FROM test3rf.error_test WHERE k=?&quot;)
        self.session.execute(&quot;DROP TABLE test3rf.error_test&quot;)

        with self.assertRaises(InvalidRequest):
&gt;           self.session.execute(prepared, [0])
E           AssertionError: InvalidRequest not raised

Screenshot from 2024-01-16 17-24-22

Argus, CI job

mykaul commented 7 months ago

Is it a regression? Where does it work?

vponomaryov commented 7 months ago

Is it a regression? Where does it work?

It works using Scylla-master: https://argus.scylladb.com/test/8fb14958-92b0-4e03-b9d0-97f28b57c35a/runs?additionalRuns[]=af2ab4fd-a50f-4401-983c-d354fa87996a For the 5.4 and 2024.1 it was not run yet AFAICS.