@@ -22,34 +22,79 @@ def tearDownClass(self):
22
22
self .clients .stop ()
23
23
#self.clients[0].cleanup()
24
24
25
-
26
- def test_0_normal_operation (self ):
25
+ def test_0_0_0 (self ):
27
26
print ('### normalOpsTest ###' )
28
27
29
- for i in range (1000 ):
30
- time .sleep (3 )
31
- self .clients .print_agg ()
32
-
33
- def test_2_node_disconnect (self ):
34
- print ('### disconnectTest ###' )
28
+ time .sleep (10 )
29
+ subprocess .check_call (['blockade' ,'partition' ,'node3' ])
35
30
36
31
self .clients .set_acc_to_tx (10000 )
37
32
self .clients .start ()
38
33
39
- subprocess .check_call (['blockade' ,'partition' ,'node3' ])
40
- print ('Node3 disconnected' )
41
-
42
- for i in range (5 ):
34
+ for i in range (1000 ):
43
35
time .sleep (3 )
44
- for client in self .clients :
45
- agg = client .history .aggregate ()
46
- print (agg )
47
- self .assertTrue (agg ['transfer' ]['finish' ]['Commit' ] > 0 )
36
+ self .clients .print_agg ()
48
37
print ("\n " )
49
38
50
- subprocess .check_call (['blockade' ,'join' ])
51
39
self .clients .stop ()
52
40
41
+
42
+
43
+ # def test_0_normal_operation(self):
44
+ # print('### normalOpsTest ###')
45
+ #
46
+ # self.clients.set_acc_to_tx(10000)
47
+ # self.clients.start()
48
+ #
49
+ # for i in range(5):
50
+ # time.sleep(3)
51
+ # for client in self.clients:
52
+ # agg = client.history.aggregate()
53
+ # print(agg)
54
+ # self.assertTrue(agg['transfer']['finish']['Commit'] > 0)
55
+ # print("\n")
56
+ #
57
+ # self.clients.stop()
58
+ #
59
+ # def test_1_distributed_deadlock(self):
60
+ # print('### DDD test ###')
61
+ #
62
+ # self.clients.set_acc_to_tx(10)
63
+ # self.clients.start()
64
+ #
65
+ # for i in range(5):
66
+ # time.sleep(3)
67
+ # for client in self.clients:
68
+ # agg = client.history.aggregate()
69
+ # print(agg)
70
+ # self.assertTrue(agg['transfer']['finish']['Commit'] > 0)
71
+ # print("\n")
72
+ #
73
+ # self.clients.stop()
74
+ #
75
+ # def test_2_node_disconnect(self):
76
+ # print('### disconnectTest ###')
77
+ #
78
+ # self.clients.set_acc_to_tx(10000)
79
+ # self.clients.start()
80
+ #
81
+ # subprocess.check_call(['blockade','partition','node3'])
82
+ # print('Node3 disconnected')
83
+ #
84
+ # # give cluster some time to discover problem
85
+ # time.sleep(3)
86
+ #
87
+ # for i in range(5):
88
+ # time.sleep(3)
89
+ # for client in self.clients:
90
+ # agg = client.history.aggregate()
91
+ # print(agg)
92
+ # self.assertTrue(agg['transfer']['finish']['Commit'] > 0)
93
+ # print("\n")
94
+ #
95
+ # subprocess.check_call(['blockade','join'])
96
+ # self.clients.stop()
97
+
53
98
subprocess .check_call (['blockade' ,'join' ])
54
99
print ("Node3 joined back" )
55
100
0 commit comments