コード例 #1
0
ファイル: update_test.py プロジェクト: shawnkumar/uptest
    def update_test(self):
        cluster = Cluster(get_ctool_nodes())
        cluster.clean_bootstrap('apache/cassandra-2.1')

        [node1, node2] = cluster.get_nodes()

        lastkey = self.fillData(10000000000, cluster)

        cluster.round_robin_update('apache/trunk')

        repout_n1 = cluster.nodetool('repair -hosts ' + node1.get_address(), nodes=[node1], capture_output=True)
        repout_n2 = cluster.nodetool('repair -hosts ' + node2.get_address(), nodes=[node2], capture_output=True)

        (output1, error1) = repout_n1[0]
        (output2, error2) = repout_n1[0]

        #check return values of repair is succesful
        self.assertEqual(repout_n1[1], 1, str(error1))
        self.assertEqual(repout_n2[1], 1, str(error2))

        #perform some basic validation to check querying values works
        (info, rc)= cluster.stress("read n={numWrites} -pop seq=1..{lastkey} no-wrap".format(numWrites=lastkey, lastkey=lastkey))

        #check validation error-free
        self.assertEqual(rc, 1)

        #check that there are no errors in logs:
        self.check_logs(cluster)