Fixing various unstable tests
This commit is contained in:
@@ -218,6 +218,7 @@ greaterthanorequalcass36 = unittest.skipUnless(CASSANDRA_VERSION >= '3.6', 'Cass
|
||||
lessthancass30 = unittest.skipUnless(CASSANDRA_VERSION < '3.0', 'Cassandra version less then 3.0 required')
|
||||
dseonly = unittest.skipUnless(DSE_VERSION, "Test is only applicalbe to DSE clusters")
|
||||
pypy = unittest.skipUnless(platform.python_implementation() == "PyPy", "Test is skipped unless it's on PyPy")
|
||||
notpy3 = unittest.skipIf(sys.version_info >= (3, 0), "Test not applicable for Python 3.x runtime")
|
||||
|
||||
|
||||
def wait_for_node_socket(node, timeout):
|
||||
@@ -546,7 +547,7 @@ class BasicKeyspaceUnitTestCase(unittest.TestCase):
|
||||
@classmethod
|
||||
def common_setup(cls, rf, keyspace_creation=True, create_class_table=False, metrics=False):
|
||||
cls.cluster = Cluster(protocol_version=PROTOCOL_VERSION, metrics_enabled=metrics)
|
||||
cls.session = cls.cluster.connect()
|
||||
cls.session = cls.cluster.connect(wait_for_all_pools=True)
|
||||
cls.ks_name = cls.__name__.lower()
|
||||
if keyspace_creation:
|
||||
cls.create_keyspace(rf)
|
||||
|
@@ -162,7 +162,7 @@ class HeartbeatTest(unittest.TestCase):
|
||||
|
||||
def wait_for_no_connections(self, host, cluster):
|
||||
retry = 0
|
||||
while(retry < 100):
|
||||
while(retry < 200):
|
||||
retry += 1
|
||||
connections = self.fetch_connections(host, cluster)
|
||||
if len(connections) is 0:
|
||||
|
@@ -26,7 +26,7 @@ from cassandra.query import (PreparedStatement, BoundStatement, SimpleStatement,
|
||||
from cassandra.cluster import Cluster, NoHostAvailable
|
||||
from cassandra.policies import HostDistance, RoundRobinPolicy
|
||||
from tests.unit.cython.utils import notcython
|
||||
from tests.integration import use_singledc, PROTOCOL_VERSION, BasicSharedKeyspaceUnitTestCase, get_server_versions, greaterthanprotocolv3, MockLoggingHandler, get_supported_protocol_versions
|
||||
from tests.integration import use_singledc, PROTOCOL_VERSION, BasicSharedKeyspaceUnitTestCase, get_server_versions, greaterthanprotocolv3, MockLoggingHandler, get_supported_protocol_versions, notpy3
|
||||
|
||||
import time
|
||||
import re
|
||||
@@ -71,6 +71,7 @@ class QueryTests(BasicSharedKeyspaceUnitTestCase):
|
||||
str(event)
|
||||
|
||||
@notcython
|
||||
@notpy3
|
||||
def test_row_error_message(self):
|
||||
"""
|
||||
Test to validate, new column deserialization message
|
||||
@@ -483,7 +484,7 @@ class BatchStatementTests(BasicSharedKeyspaceUnitTestCase):
|
||||
self.cluster = Cluster(protocol_version=PROTOCOL_VERSION)
|
||||
if PROTOCOL_VERSION < 3:
|
||||
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
|
||||
self.session = self.cluster.connect()
|
||||
self.session = self.cluster.connect(wait_for_all_pools=True)
|
||||
|
||||
def tearDown(self):
|
||||
self.cluster.shutdown()
|
||||
|
Reference in New Issue
Block a user