Skip to content

Commit a0b40e3

Browse files
committed
in/out test for raftable
1 parent c616219 commit a0b40e3

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

contrib/raftable/tests/test_recovery.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,35 @@ def test_1_node_disconnect(self):
4444
# check we didn't stuck in set op
4545
self.assertTrue(agg['setkey']['running_latency'] < 3)
4646

47+
def test_1_node_in_node_out(self):
48+
print('### InOutTest ###')
49+
50+
subprocess.check_call(['blockade','partition','node3'])
51+
print('Node3 disconnected')
52+
53+
print('Waiting 5s')
54+
time.sleep(5)
55+
56+
for client in self.clients:
57+
agg = client.history.aggregate()
58+
print(agg)
59+
# check we didn't stuck in set op
60+
self.assertTrue(agg['setkey']['running_latency'] < 3)
61+
62+
subprocess.check_call(['blockade','join'])
63+
print('Node3 connected')
64+
65+
print('Waiting 5s')
66+
time.sleep(5)
67+
68+
for client in self.clients:
69+
agg = client.history.aggregate()
70+
print(agg)
71+
# check we didn't stuck in set op
72+
self.assertTrue(agg['setkey']['running_latency'] < 3)
73+
74+
75+
4776
if __name__ == '__main__':
4877
unittest.main()
4978

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy