18
18
19
19
from cassandra .cluster import Cluster
20
20
from tests import notwindows
21
+ from tests .unit .cython .utils import notcython
21
22
from tests .integration import (execute_until_pass ,
22
23
execute_with_long_wait_retry , use_cluster )
23
24
27
28
import unittest # noqa
28
29
29
30
31
+ CCM_IS_DSE = (os .environ .get ('CCM_IS_DSE' , None ) == 'true' )
32
+
33
+
30
34
@unittest .skipIf (os .environ .get ('CCM_ARGS' , None ), 'environment has custom CCM_ARGS; skipping' )
31
35
@notwindows
36
+ @notcython # no need to double up on this test; also __default__ setting doesn't work
32
37
class DseCCMClusterTest (unittest .TestCase ):
33
38
"""
34
39
This class can be executed setting the DSE_VERSION variable, for example:
@@ -42,6 +47,7 @@ def test_dse_5x(self):
42
47
def test_dse_60 (self ):
43
48
self ._test_basic (Version ('6.0.2' ))
44
49
50
+ @unittest .skipUnless (CCM_IS_DSE , 'DSE version unavailable' )
45
51
def test_dse_67 (self ):
46
52
self ._test_basic (Version ('6.7.0' ))
47
53
@@ -55,7 +61,8 @@ def _test_basic(self, dse_version):
55
61
use_cluster (cluster_name = cluster_name , nodes = [3 ],
56
62
dse_cluster = True , dse_options = {}, dse_version = dse_version )
57
63
58
- cluster = Cluster ()
64
+ cluster = Cluster (
65
+ allow_beta_protocol_version = (dse_version >= Version ('6.7.0' )))
59
66
session = cluster .connect ()
60
67
result = execute_until_pass (
61
68
session ,
0 commit comments