Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a0fd98b

Browse files
committed
some debug info in client2
1 parent a4806e5 commit a0fd98b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests2/client2.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ def status(self):
7272
while self.running:
7373
msg = yield from self.child_pipe.coro_recv()
7474
if msg == 'status':
75+
print('evloop: got status request')
7576
serialized_aggs = {}
7677
for name, aggregate in self.aggregates.items():
7778
serialized_aggs[name] = aggregate.as_dict()
7879
aggregate.clear_values()
7980
self.child_pipe.send(serialized_aggs)
81+
print('evloop: sent status response')
82+
else:
83+
print('evloop: unknown message')
8084

8185

8286
@asyncio.coroutine
@@ -94,6 +98,7 @@ def exec_tx(self, tx_block, aggname_prefix, conn_i):
9498
agg.finish_tx('commit')
9599
except psycopg2.Error as e:
96100
agg.finish_tx(e.pgerror)
101+
print("We've count to infinity!")
97102

98103
@asyncio.coroutine
99104
def transfer_tx(self, conn, cur):
@@ -117,6 +122,7 @@ def total_tx(self, conn, cur):
117122
yield from cur.execute('select sum(amount) from bank_test')
118123
total = yield from cur.fetchone()
119124
if total[0] != 0:
125+
print('Isolation error, totel = ', total[0])
120126
self.isolation += 1
121127

122128
def run(self):
@@ -138,8 +144,12 @@ def bgrun(self):
138144
self.evloop_process.start()
139145

140146
def get_status(self):
147+
print('test: sending status request')
141148
self.parent_pipe.send('status')
142-
return self.parent_pipe.recv()
149+
print('test: awaitng status response')
150+
resp = self.parent_pipe.recv()
151+
print('test: got status response')
152+
return resp
143153

144154
def stop(self):
145155
self.running = False

0 commit comments

Comments
 (0)