Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9eb1afb

Browse files
committed
simplify mmts test
1 parente2eaa0c commit9eb1afb

File tree

5 files changed

+29
-25
lines changed

5 files changed

+29
-25
lines changed

‎tests2/blockade.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ containers:
2929
ports:
3030
5434:5432
3131

32+
network:
33+
driver:udn
3234

‎tests2/docker-entrypoint.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,18 @@ if [ "$1" = 'postgres' ]; then
7171
max_replication_slots = 10
7272
max_wal_senders = 10
7373
shared_preload_libraries = 'raftable,multimaster'
74+
7475
raftable.id =$NODE_ID
7576
raftable.peers = '$RAFT_PEERS'
76-
multimaster.workers=4
77-
multimaster.use_raftable=true
77+
78+
multimaster.workers = 4
79+
multimaster.use_raftable = true
7880
multimaster.queue_size=52857600
79-
multimaster.ignore_tables_without_pk=1
81+
multimaster.ignore_tables_without_pk =1
8082
multimaster.node_id =$NODE_ID
8183
multimaster.conn_strings = '$CONNSTRS'
84+
multimaster.heartbeat_recv_timeout = 1000
85+
multimaster.heartbeat_send_timeout = 250
8286
EOF
8387

8488
tail -n 20$PGDATA/postgresql.conf

‎tests2/lib/bank_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ def start(self):
2727
client.start()
2828

2929
defstop(self):
30-
print('collection stop called',self._clients)
3130
forclientinself._clients:
32-
print('stop coll')
3331
client.stop()
3432

3533

@@ -160,8 +158,8 @@ def start(self):
160158
defstop(self):
161159
print('Stopping!');
162160
self.run.value=False
163-
self.total_process.join()
164-
self.transfer_process.join()
161+
self.total_process.terminate()
162+
self.transfer_process.terminate()
165163
return
166164

167165
defcleanup(self):

‎tests2/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
git+https://github.com/kelvich/blockade.git
1+
git+https://github.com/kelvich/blockade.git@user-defined-network
22
psycopg2

‎tests2/test_recovery.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,27 @@ def test_1_node_disconnect(self):
3636
subprocess.check_call(['blockade','partition','node3'])
3737
print('Node3 disconnected')
3838

39-
print('Waiting12s to discover failure')
40-
time.sleep(12)
39+
print('Waiting20s to discover failure')
40+
time.sleep(20)
4141
forclientinself.clients:
4242
agg=client.history.aggregate()
4343
print(agg)
4444

45-
print('Waiting 3s to check operability')
46-
time.sleep(3)
47-
forclientinself.clients:
48-
agg=client.history.aggregate()
49-
print(agg)
50-
51-
subprocess.check_call(['blockade','join'])
52-
print('Node3 connected back')
53-
54-
print('Waiting 12s for catch-up')
55-
time.sleep(12)
56-
57-
forclientinself.clients:
58-
agg=client.history.aggregate()
59-
print(agg)
45+
# print('Waiting 3s to check operability')
46+
# time.sleep(3)
47+
# for client in self.clients:
48+
# agg = client.history.aggregate()
49+
# print(agg)
50+
#
51+
# subprocess.check_call(['blockade','join'])
52+
# print('Node3 connected back')
53+
#
54+
# print('Waiting 12s for catch-up')
55+
# time.sleep(12)
56+
#
57+
# for client in self.clients:
58+
# agg = client.history.aggregate()
59+
# print(agg)
6060

6161

6262
if__name__=='__main__':

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp