Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-17454

flaky dtest-upgrade.upgrade_tests.cql_tests TestCQLNodes2RF1_Upgrade_indev_4_0_x_To_indev_trunk test_static_cf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • CI
    • None
    • Correctness - Test Failure
    • Normal
    • Normal
    • DTest
    • All
    • None

    Description

      Error Messagecassandra.WriteFailure: Error from server: code=1500 [Replica(s) failed to execute write] message="Operation failed - received 1 responses and 1 failures: UNKNOWN from /127.0.0.1:7000" info={'consistency': 'ONE', 'required_responses': 1, 'received_responses': 1, 'failures': 1, 'error_code_map': {'127.0.0.1': '0x0000'}}Stacktraceself = <abc.TestCQLNodes2RF1_Upgrade_indev_4_0_x_To_indev_trunk object at 0x7f36e8ae1a60>
      
          def test_static_cf(self):
              """ Test static CF syntax """
              cursor = self.prepare()
          
              # Create
              cursor.execute("""
                      CREATE TABLE users (
                          userid uuid PRIMARY KEY,
                          firstname text,
                          lastname text,
                          age int
                      );
                  """)
          
              for is_upgraded, cursor in self.do_upgrade(cursor):
                  logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old"))
                  cursor.execute("TRUNCATE users")
          
                  # Inserts
                  cursor.execute("INSERT INTO users (userid, firstname, lastname, age) VALUES (550e8400-e29b-41d4-a716-446655440000, 'Frodo', 'Baggins', 32)")
                  cursor.execute("UPDATE users SET firstname = 'Samwise', lastname = 'Gamgee', age = 33 WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479")
          
                  # Queries
                  assert_one(cursor, "SELECT firstname, lastname FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000", ['Frodo', 'Baggins'])
          
                  assert_one(cursor, "SELECT * FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000", [UUID('550e8400-e29b-41d4-a716-446655440000'), 32, 'Frodo', 'Baggins'])
          
                  assert_all(cursor, "SELECT * FROM users", [[UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 33, 'Samwise', 'Gamgee'],
                                                             [UUID('550e8400-e29b-41d4-a716-446655440000'), 32, 'Frodo', 'Baggins']])
          
                  # Test batch inserts
      >           cursor.execute("""
                          BEGIN BATCH
                              INSERT INTO users (userid, age) VALUES (550e8400-e29b-41d4-a716-446655440000, 36)
                              UPDATE users SET age = 37 WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479
                              DELETE firstname, lastname FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000
                              DELETE firstname, lastname FROM users WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479
                          APPLY BATCH
                      """)
      
      upgrade_tests/cql_tests.py:74: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      ../venv/src/cassandra-driver/cassandra/cluster.py:2618: in execute
          return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result() 

      Attachments

        Issue Links

          Activity

            People

              brandon.williams Brandon Williams
              smiklosovic Stefan Miklosovic
              Brandon Williams
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: