Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-10664 Fix failing tests
  3. CASSANDRA-10932

pushed_notifications_test.py schema_changes_test is failing

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.0.3, 3.3
    • None
    • None

    Description

      pushed_notifications_test.py:TestPushedNotifications.schema_changes_test is failing on HEAD of cassandra-3.0. It may be simply a problem with the test assertions, so someone just needs to double check if the schema change notifications pushed to the driver are correct.

      In actuality, the driver gets 8 notifications, listed in the debug output of the test failure:

      ======================================================================
      FAIL: schema_changes_test (pushed_notifications_test.TestPushedNotifications)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/philipthompson/cstar/cassandra-dtest/tools.py", line 253, in wrapped
          f(obj)
        File "/Users/philipthompson/cstar/cassandra-dtest/pushed_notifications_test.py", line 244, in schema_changes_test
          self.assertEquals(14, len(notifications))
      AssertionError: 14 != 8
      -------------------- >> begin captured logging << --------------------
      dtest: DEBUG: cluster ccm directory: /var/folders/v3/z4wf_34n1q506_xjdy49gb780000gn/T/dtest-93xMe2
      dtest: DEBUG: Source 127.0.0.2 sent {'keyspace': u'ks', 'change_type': u'CREATED', 'target_type': uCorrect typo in MV creation query
      'KEYSPACE'}
      dtest: DEBUG: Source 127.0.0.2 sent {'keyspace': u'ks', 'change_type': u'CREATED', 'target_type': u'TABLE', u'table': u't'}
      dtest: DEBUG: Source 127.0.0.2 sent {'keyspace': u'ks', 'change_type': u'UPDATED', 'target_type': u'TABLE', u'table': u't'}
      dtest: DEBUG: Source 127.0.0.2 sent {'keyspace': u'ks', 'change_type': u'CREATED', 'target_type': u'TABLE', u'table': u'mv'}
      dtest: DEBUG: Source 127.0.0.2 sent {'keyspace': u'ks', 'change_type': u'UPDATED', 'target_type': u'TABLE', u'table': u'mv'}
      dtest: DEBUG: Source 127.0.0.2 sent {'keyspace': u'ks', 'change_type': u'DROPPED', 'target_type': u'TABLE', u'table': u'mv'}
      dtest: DEBUG: Source 127.0.0.2 sent {'keyspace': u'ks', 'change_type': u'DROPPED', 'target_type': u'TABLE', u'table': u't'}
      dtest: DEBUG: Source 127.0.0.2 sent {'keyspace': u'ks', 'change_type': u'DROPPED', 'target_type': u'KEYSPACE'}
      dtest: DEBUG: Waiting for notifications from 127.0.0.2
      --------------------- >> end captured logging << ---------------------
      

      The test has been expecting the following 14, though:

      self.assertDictContainsSubset({'change_type': u'CREATED', 'target_type': u'KEYSPACE'}, notifications[0])
              self.assertDictContainsSubset({'change_type': u'UPDATED', 'target_type': u'KEYSPACE'}, notifications[1])
              self.assertDictContainsSubset({'change_type': u'CREATED', 'target_type': u'TABLE', u'table': u't'}, notifications[2])
              self.assertDictContainsSubset({'change_type': u'UPDATED', 'target_type': u'KEYSPACE'}, notifications[3])
              self.assertDictContainsSubset({'change_type': u'UPDATED', 'target_type': u'TABLE', u'table': u't'}, notifications[4])
              self.assertDictContainsSubset({'change_type': u'UPDATED', 'target_type': u'KEYSPACE'}, notifications[5])
              self.assertDictContainsSubset({'change_type': u'CREATED', 'target_type': u'TABLE', u'table': u'mv'}, notifications[6])
              self.assertDictContainsSubset({'change_type': u'UPDATED', 'target_type': u'KEYSPACE'}, notifications[7])
              self.assertDictContainsSubset({'change_type': u'UPDATED', 'target_type': u'TABLE', u'table': u'mv'}, notifications[8])
              self.assertDictContainsSubset({'change_type': u'UPDATED', 'target_type': u'KEYSPACE'}, notifications[9])
              self.assertDictContainsSubset({'change_type': u'DROPPED', 'target_type': u'TABLE', u'table': u'mv'}, notifications[10])
              self.assertDictContainsSubset({'change_type': u'UPDATED', 'target_type': u'KEYSPACE'}, notifications[11])
              self.assertDictContainsSubset({'change_type': u'DROPPED', 'target_type': u'TABLE', u'table': u't'}, notifications[12])
              self.assertDictContainsSubset({'change_type': u'DROPPED', 'target_type': u'KEYSPACE'}, notifications[13])
      

      Attachments

        Activity

          People

            slebresne Sylvain Lebresne
            philipthompson Philip Thompson
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: