Don't set min/max/core requests/conns if using v3 protocol

This commit is contained in:
Tyler Hobbs
2014-06-24 17:03:46 -05:00
parent 496674d04c
commit 82477e20ac
4 changed files with 10 additions and 4 deletions

View File

@@ -151,6 +151,8 @@ class ClusterTests(unittest.TestCase):
"""
Test connection setting getters and setters
"""
if PROTOCOL_VERSION >= 3:
raise unittest.SkipTest("min/max requests and core/max conns aren't used with v3 protocol")
cluster = Cluster(protocol_version=PROTOCOL_VERSION)

View File

@@ -33,7 +33,8 @@ class ClusterTests(unittest.TestCase):
def setUp(self):
self.cluster = Cluster(protocol_version=PROTOCOL_VERSION)
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
if PROTOCOL_VERSION < 3:
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
self.session = self.cluster.connect()
self.session.row_factory = tuple_factory

View File

@@ -223,7 +223,8 @@ class BatchStatementTests(unittest.TestCase):
% (PROTOCOL_VERSION,))
self.cluster = Cluster(protocol_version=PROTOCOL_VERSION)
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
if PROTOCOL_VERSION < 3:
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
self.session = self.cluster.connect()
self.session.execute("TRUNCATE test3rf.test")
@@ -318,7 +319,8 @@ class SerialConsistencyTests(unittest.TestCase):
% (PROTOCOL_VERSION,))
self.cluster = Cluster(protocol_version=PROTOCOL_VERSION)
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
if PROTOCOL_VERSION < 3:
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
self.session = self.cluster.connect()
def test_conditional_update(self):

View File

@@ -41,7 +41,8 @@ class QueryPagingTests(unittest.TestCase):
% (PROTOCOL_VERSION,))
self.cluster = Cluster(protocol_version=PROTOCOL_VERSION)
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
if PROTOCOL_VERSION < 3:
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
self.session = self.cluster.connect()
self.session.execute("TRUNCATE test3rf.test")