Example #1
0
 def setUp(self):
     self.service_name = 'dummy_service'
     self.initial_trace_id = 300  # greater than 256 to not use cached ints
     self.tx = Tx(self.tx_tree,
                  Mock(),
                  1,
                  CocaineHeaders(),
                  self.service_name,
                  trace_id=self.initial_trace_id)
     self.initial_log = self.tx.log
Example #2
0
 def setUp(self):
     self.service_name = 'dummy_service'
     self.tx = Tx(self.tx_tree, Mock(), 1, CocaineHeaders(),
                  self.service_name)
     self.initial_log = self.tx.log
     assert not isinstance(self.initial_log, TraceAdapter)
 def test_tx(self):
     tx = Tx(self.tx_tree, self.PipeMock(), 1)
     tx.dummy().wait(4)
     tx.failed().wait(4)
 def test_tx_on_done(self):
     io = IOLoop.current()
     tx = Tx(self.tx_tree, self.PipeMock(), 1)
     tx.done()
     io.run_sync(tx.get)
Example #5
0
 def test_tx_on_done(self):
     io = IOLoop.current()
     tx = Tx(self.tx_tree, self.PipeMock(), 1, CocaineHeaders())
     tx.done()
     io.run_sync(tx.get, timeout=1)
Example #6
0
 def test_tx(self):
     tx = Tx(self.tx_tree, self.PipeMock(), 1, CocaineHeaders())
     tx.dummy().wait(4)
     tx.failed().wait(4)
Example #7
0
 def test_tx_on_done(self):
     io = IOLoop.current()
     tx = Tx(self.tx_tree, self.PipeMock(), 1, CocaineHeaders(),
             self.service_name)
     tx.done()
     io.run_sync(tx.get, timeout=1)
Example #8
0
 def test_tx(self):
     tx = Tx(self.tx_tree, self.PipeMock(), 1, CocaineHeaders(),
             self.service_name)
     tx.dummy().wait(4)
     tx.failed().wait(4)
Example #9
0
 def test_print(self):
     log.info(
         Tx(self.tx_tree, self.PipeMock(), 1, CocaineHeaders(),
            self.service_name))