Ejemplo n.º 1
0
        def mock_get_handlers():
            transaction_handlers = thread.get_from_thread_store(
                'transaction_handlers')
            if not transaction_handlers:
                transaction_handlers = {'enter': [], 'exit': []}

            length = "%s/%s" % (len(transaction_handlers['enter']),
                                len(transaction_handlers['exit']))
            log_line("get: {pid: %s, idx: %s, iteration: %s, len: %s}" %
                     (os.getpid(), thread.get_index(), thread.get_iteration(),
                      length))
            return transaction_handlers
Ejemplo n.º 2
0
 def mock_set_handlers(handlers):
     log_line("set: {pid: %s, idx: %s, iteration: %s, handlers: %s}," %
              (os.getpid(), thread.get_index(), thread.get_iteration(),
               handlers))
     thread.put_into_thread_store(transaction_handlers=handlers)
Ejemplo n.º 3
0
 def test_00(self):
     log_it("00", reader.get_vars())
     if get_iteration() > 5:
         raise BaseException("!!!")
Ejemplo n.º 4
0
def setup():    # setup_module
    if get_iteration() > 6:     # do one pass to set stop_cause once
        return

    reader.read_vars()  #