@@ -20,7 +20,7 @@ def setup_class(cls):
20
20
cls .session = cls .cluster .connect ()
21
21
cls .create_ks_and_cf (cls )
22
22
cls .create_data (cls .session )
23
-
23
+
24
24
@classmethod
25
25
def teardown_class (cls ):
26
26
cls .cluster .shutdown ()
@@ -32,7 +32,7 @@ def verify_same_host_in_tracing(self, results):
32
32
for event in events :
33
33
LOGGER .info ("TRACE EVENT: %s %s %s" , event .source , event .thread_name , event .description )
34
34
host_set .add (event .source )
35
-
35
+
36
36
self .assertEqual (len (host_set ), 1 )
37
37
self .assertIn ('locally' , "\n " .join ([event .description for event in events ]))
38
38
@@ -43,7 +43,7 @@ def verify_same_host_in_tracing(self, results):
43
43
for event in events :
44
44
LOGGER .info ("TRACE EVENT: %s %s" , event .source , event .activity )
45
45
host_set .add (event .source )
46
-
46
+
47
47
self .assertEqual (len (host_set ), 1 )
48
48
self .assertIn ('locally' , "\n " .join ([event .activity for event in events ]))
49
49
@@ -54,7 +54,7 @@ def verify_same_shard_in_tracing(self, results):
54
54
for event in events :
55
55
LOGGER .info ("TRACE EVENT: %s %s %s" , event .source , event .thread_name , event .description )
56
56
shard_set .add (event .thread_name )
57
-
57
+
58
58
self .assertEqual (len (shard_set ), 1 )
59
59
self .assertIn ('locally' , "\n " .join ([event .description for event in events ]))
60
60
@@ -65,10 +65,10 @@ def verify_same_shard_in_tracing(self, results):
65
65
for event in events :
66
66
LOGGER .info ("TRACE EVENT: %s %s" , event .thread , event .activity )
67
67
shard_set .add (event .thread )
68
-
68
+
69
69
self .assertEqual (len (shard_set ), 1 )
70
70
self .assertIn ('locally' , "\n " .join ([event .activity for event in events ]))
71
-
71
+
72
72
def create_ks_and_cf (self ):
73
73
self .session .execute (
74
74
"""
@@ -79,8 +79,8 @@ def create_ks_and_cf(self):
79
79
"""
80
80
CREATE KEYSPACE test1
81
81
WITH replication = {
82
- 'class': 'NetworkTopologyStrategy',
83
- 'replication_factor': 1
82
+ 'class': 'NetworkTopologyStrategy',
83
+ 'replication_factor': 1
84
84
} AND tablets = {
85
85
'initial': 8
86
86
}
@@ -90,14 +90,14 @@ def create_ks_and_cf(self):
90
90
"""
91
91
CREATE TABLE test1.table1 (pk int, ck int, v int, PRIMARY KEY (pk, ck));
92
92
""" )
93
-
93
+
94
94
@staticmethod
95
95
def create_data (session ):
96
96
prepared = session .prepare (
97
97
"""
98
98
INSERT INTO test1.table1 (pk, ck, v) VALUES (?, ?, ?)
99
99
""" )
100
-
100
+
101
101
for i in range (50 ):
102
102
bound = prepared .bind ((i , i % 5 , i % 2 ))
103
103
session .execute (bound )
0 commit comments