Ejemplo n.º 1
0
 def test_concurrent(self):
     m = master.Master(options.Options(), proxy.DummyServer())
     sc = script.Script(
         tutils.test_data.path("data/addonscripts/concurrent_decorator.py"))
     m.addons.add(sc)
     f1, f2 = tutils.tflow(), tutils.tflow()
     m.request(f1)
     m.request(f2)
     start = time.time()
     while time.time() - start < 5:
         if f1.reply.state == f2.reply.state == "committed":
             return
     raise ValueError("Script never acked")
Ejemplo n.º 2
0
 def test_concurrent(self):
     s = state.State()
     m = master.FlowMaster(options.Options(), None, s)
     sc = script.Script(
         tutils.test_data.path("data/addonscripts/concurrent_decorator.py"))
     m.addons.add(m.options, sc)
     f1, f2 = tutils.tflow(), tutils.tflow()
     self.invoke(m, "request", f1)
     self.invoke(m, "request", f2)
     start = time.time()
     while time.time() - start < 5:
         if f1.reply.acked and f2.reply.acked:
             return
     raise ValueError("Script never acked")
Ejemplo n.º 3
0
 def test_concurrent(self):
     s = state.State()
     m = master.FlowMaster(options.Options(), None, s)
     sc = script.Script(
         tutils.test_data.path(
             "data/addonscripts/concurrent_decorator.py"
         )
     )
     m.addons.add(m.options, sc)
     f1, f2 = tutils.tflow(), tutils.tflow()
     m.request(f1)
     m.request(f2)
     start = time.time()
     while time.time() - start < 5:
         if f1.reply.state == f2.reply.state == "committed":
             return
     raise ValueError("Script never acked")
Ejemplo n.º 4
0
 def test_concurrent(self):
     s = state.State()
     m = master.FlowMaster(options.Options(), None, s)
     sc = script.Script(
         tutils.test_data.path(
             "data/addonscripts/concurrent_decorator.py"
         )
     )
     m.addons.add(sc)
     f1, f2 = tutils.tflow(), tutils.tflow()
     self.invoke(m, "request", f1)
     self.invoke(m, "request", f2)
     start = time.time()
     while time.time() - start < 5:
         if f1.reply.acked and f2.reply.acked:
             return
     raise ValueError("Script never acked")