##// END OF EJS Templates
Merge pull request #1852 from minrk/resubmitbufs...
Fernando Perez -
r7301:344e5435 merge
parent child Browse files
Show More
@@ -1163,7 +1163,7 b' class Hub(SessionFactory):'
1163 # send the messages
1163 # send the messages
1164 for rec in records:
1164 for rec in records:
1165 header = rec['header']
1165 header = rec['header']
1166 msg = self.session.msg(header['msg_type'])
1166 msg = self.session.msg(header['msg_type'], parent=header)
1167 msg_id = msg['msg_id']
1167 msg_id = msg['msg_id']
1168 msg['content'] = rec['content']
1168 msg['content'] = rec['content']
1169
1169
@@ -1177,7 +1177,7 b' class Hub(SessionFactory):'
1177
1177
1178 resubmitted[rec['msg_id']] = msg_id
1178 resubmitted[rec['msg_id']] = msg_id
1179 self.pending.add(msg_id)
1179 self.pending.add(msg_id)
1180 msg['buffers'] = []
1180 msg['buffers'] = rec['buffers']
1181 try:
1181 try:
1182 self.db.add_record(msg_id, init_record(msg))
1182 self.db.add_record(msg_id, init_record(msg))
1183 except Exception:
1183 except Exception:
@@ -312,6 +312,20 b' class TestClient(ClusterTestCase):'
312 r2 = ahr.get(1)
312 r2 = ahr.get(1)
313 self.assertFalse(r1 == r2)
313 self.assertFalse(r1 == r2)
314
314
315 def test_resubmit_chain(self):
316 """resubmit resubmitted tasks"""
317 v = self.client.load_balanced_view()
318 ar = v.apply_async(lambda x: x, 'x'*1024)
319 ar.get()
320 self._wait_for_idle()
321 ars = [ar]
322
323 for i in range(10):
324 ar = ars[-1]
325 ar2 = self.client.resubmit(ar.msg_ids)
326
327 [ ar.get() for ar in ars ]
328
315 def test_resubmit_header(self):
329 def test_resubmit_header(self):
316 """resubmit shouldn't clobber the whole header"""
330 """resubmit shouldn't clobber the whole header"""
317 def f():
331 def f():
General Comments 0
You need to be logged in to leave comments. Login now