@@ -72,11 +72,15 @@ def status(self):
72
72
while self .running :
73
73
msg = yield from self .child_pipe .coro_recv ()
74
74
if msg == 'status' :
75
+ print ('evloop: got status request' )
75
76
serialized_aggs = {}
76
77
for name , aggregate in self .aggregates .items ():
77
78
serialized_aggs [name ] = aggregate .as_dict ()
78
79
aggregate .clear_values ()
79
80
self .child_pipe .send (serialized_aggs )
81
+ print ('evloop: sent status response' )
82
+ else :
83
+ print ('evloop: unknown message' )
80
84
81
85
82
86
@asyncio .coroutine
@@ -94,6 +98,7 @@ def exec_tx(self, tx_block, aggname_prefix, conn_i):
94
98
agg .finish_tx ('commit' )
95
99
except psycopg2 .Error as e :
96
100
agg .finish_tx (e .pgerror )
101
+ print ("We've count to infinity!" )
97
102
98
103
@asyncio .coroutine
99
104
def transfer_tx (self , conn , cur ):
@@ -117,6 +122,7 @@ def total_tx(self, conn, cur):
117
122
yield from cur .execute ('select sum(amount) from bank_test' )
118
123
total = yield from cur .fetchone ()
119
124
if total [0 ] != 0 :
125
+ print ('Isolation error, totel = ' , total [0 ])
120
126
self .isolation += 1
121
127
122
128
def run (self ):
@@ -138,8 +144,12 @@ def bgrun(self):
138
144
self .evloop_process .start ()
139
145
140
146
def get_status (self ):
147
+ print ('test: sending status request' )
141
148
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
143
153
144
154
def stop (self ):
145
155
self .running = False
0 commit comments