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

Commit0329690

Browse files
committed
fix error handling in bank_client
1 parent189b980 commit0329690

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

‎Makefile

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,3 @@ endif
3636
check:
3737
env DESTDIR='$(abs_top_builddir)'/tmp_install make install
3838
$(prove_check)
39-
40-
xcheck:
41-
#pip install -r tests2/requirements.txt
42-
docker build -t pgmmts.
43-
cd tests2&& blockade destroy||true
44-
cd tests2&& docker rm node1||true
45-
cd tests2&& docker rm node2||true
46-
cd tests2&& docker rm node3||true
47-
cd tests2&& docker network rm tests2_net||true
48-
cd tests2&& docker network rm tests2_net||true
49-
cd tests2&& blockade up
50-
sleep 20# wait for mmts init
51-
cd tests2&& python3 test_recovery.py
52-
#cd tests2 && blockade destroy
53-

‎tests2/lib/bank_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def exec_tx(self, tx_block, aggname_prefix, conn_i):
135135
yieldfromtx_block(conn,cur,agg)
136136
agg.finish_tx('commit')
137137
exceptpsycopg2.OperationalErrorase:
138-
yieldfromcur.execute('rollback')
138+
ifnotcur.closed:
139+
yieldfromcur.execute('rollback')
139140
agg.finish_tx('operational_rollback')
140141
exceptpsycopg2.Errorase:
141142
agg.finish_tx(e.pgerror)

‎tests2/lib/failure_injector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def __init__(self):
66
self.docker_api=docker.Client()
77

88
defcontainer_exec(self,node,command):
9-
exec_id=self.docker_api.exec_create(node,command)
9+
exec_id=self.docker_api.exec_create(node,command,user='root')
1010
output=self.docker_api.exec_start(exec_id)
1111
print(command,' -> ',output)
1212

‎tests2/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
psycopg2
22
aiopg
33
aioprocessing
4-
docker
4+
docker-py

‎tests2/test_recovery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def test_node_partition(self):
9696
self.assertTrue(aggs['sumtotal_1']['isolation']==0)
9797
self.assertTrue(aggs['sumtotal_2']['isolation']==0)
9898

99-
deftest_edge_partition(self):
100-
#
99+
#def test_edge_partition(self):
100+
101101

102102

103103

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp