Skip to content

Commit 3171119

Browse files
committed
Make cqlengine tests invoke ccm.
1 parent 426664d commit 3171119

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

tests/integration/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,15 @@ def is_current_cluster(cluster_name, node_counts):
156156

157157

158158
def use_cluster(cluster_name, nodes, ipformat=None, start=True):
159+
global CCM_CLUSTER
159160
if USE_CCM_CASS_EXTERNAL:
161+
log.debug("Using external cluster %s", CCM_CLUSTER.name)
160162
return
161163

162164
if is_current_cluster(cluster_name, nodes):
163165
log.debug("Using existing cluster %s", cluster_name)
164166
return
165167

166-
global CCM_CLUSTER
167168
if CCM_CLUSTER:
168169
log.debug("Stopping cluster %s", CCM_CLUSTER.name)
169170
CCM_CLUSTER.stop()

tests/integration/cqlengine/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from cassandra.cqlengine import connection
22
from cassandra.cqlengine.management import create_keyspace
33

4-
from tests.integration import PROTOCOL_VERSION
4+
from tests.integration import use_single_node, PROTOCOL_VERSION
55

66

77
def setup_package():
8+
use_single_node()
9+
810
keyspace = 'cqlengine_test'
911
connection.setup(['localhost'],
1012
protocol_version=PROTOCOL_VERSION,

0 commit comments

Comments
 (0)