@@ -45,6 +45,10 @@ def tearDownClass(cls):
45
45
if cls .client .no_prepared_tx () != 0 :
46
46
raise AssertionError ('There are some uncommitted tx' )
47
47
48
+ counts = cls .client .insert_counts ()
49
+ if counts [0 ] != counts [1 ]:
50
+ raise AssertionError ('Different number of tuples on nodes: %d / %d' % (counts [0 ], counts [1 ]) )
51
+
48
52
# XXX: check nodes data identity here
49
53
# subprocess.check_call(['docker-compose','down'])
50
54
@@ -68,9 +72,6 @@ def test_neighbor_restart(self):
68
72
self .assertCommits (aggs )
69
73
self .assertIsolation (aggs )
70
74
71
- counts = self .client .insert_counts ()
72
- self .assertEqual (counts [0 ], counts [1 ])
73
-
74
75
75
76
def test_node_crash (self ):
76
77
print ('### test_node_crash ###' )
@@ -84,9 +85,6 @@ def test_node_crash(self):
84
85
self .assertCommits (aggs )
85
86
self .assertIsolation (aggs )
86
87
87
- counts = self .client .insert_counts ()
88
- self .assertEqual (counts [0 ], counts [1 ])
89
-
90
88
91
89
def test_partition_referee (self ):
92
90
print ('### test_partition_referee ###' )
@@ -100,8 +98,6 @@ def test_partition_referee(self):
100
98
self .assertCommits (aggs )
101
99
self .assertIsolation (aggs )
102
100
103
- counts = self .client .insert_counts ()
104
- self .assertEqual (counts [0 ], counts [1 ])
105
101
106
102
def test_double_failure_referee (self ):
107
103
print ('### test_double_failure_referee ###' )
@@ -124,8 +120,6 @@ def test_double_failure_referee(self):
124
120
self .assertCommits (aggs )
125
121
self .assertIsolation (aggs )
126
122
127
- counts = self .client .insert_counts ()
128
- self .assertEqual (counts [0 ], counts [1 ])
129
123
130
124
def test_saved_referee_decision (self ):
131
125
print ('### test_saved_referee_decision ###' )
@@ -198,8 +192,6 @@ def test_saved_referee_decision(self):
198
192
199
193
self .assertEqual (decisions_count , 0 )
200
194
201
- counts = self .client .insert_counts ()
202
- self .assertEqual (counts [0 ], counts [1 ])
203
195
204
196
def test_winner_restart (self ):
205
197
print ('### test_winner_restart ###' )
@@ -228,9 +220,6 @@ def test_winner_restart(self):
228
220
docker_api .containers .get ('node1' ).start ()
229
221
self .awaitCommit (0 )
230
222
231
- counts = self .client .insert_counts ()
232
- self .assertEqual (counts [0 ], counts [1 ])
233
-
234
223
235
224
if __name__ == '__main__' :
236
225
unittest .main ()
0 commit comments