1. 15 Sep, 2015 8 commits
  2. 14 Sep, 2015 1 commit
  3. 07 Sep, 2015 1 commit
  4. 28 Aug, 2015 6 commits
    • client: drop now useless wrapper to log safely in poll thread during shutdown · 9531c9cb
      Recent Python already catches exceptions due to garbage collection on exit.
      Julien Muchembled committed
    • storage: fix history() not waiting oid to be unlocked · e27358d1
      This fixes a random failure in testClientReconnection:
      
      Traceback (most recent call last):
        File "neo/tests/threaded/test.py", line 754, in testClientReconnection
          self.assertTrue(cluster.client.history(x1._p_oid))
      failureException: None is not true
      Julien Muchembled committed
    • Fix random failure in testRecycledClientUUID · 79be7787
      Traceback (most recent call last):
        File "neo/tests/threaded/test.py", line 838, in testRecycledClientUUID
          x = client.load(ZERO_TID)
        [...]
        File "neo/tests/threaded/test.py", line 822, in notReady
          m2s.remove(delayNotifyInformation)
        File "neo/tests/threaded/__init__.py", line 482, in remove
          del self.filter_dict[filter]
      KeyError: <function delayNotifyInformation at 0x7f511063a578>
      Julien Muchembled committed
    • Fix several random failures in tests that didn't wait for transaction to be unlocked · c4ac45a8
      NEOCluster.tic() gets a new 'slave' parameter that must be True when a client
      node is in 'master' mode (i.e. setPoll(True)). In this case, tic() will wait
      that all nodes finish their work and the client polls with a non-zero timeout.
      
      Here, tic(slave=1) is used to wait for the storage to process
      NotifyUnlockInformation notification from the master.
      
      Traceback (most recent call last):
        File "neo/tests/threaded/test.py", line 80, in testBasicStore
          self.assertEqual(data_info, cluster.storage.getDataLockInfo())
        File "neo/tests/__init__.py", line 170, in assertEqual
          return super(NeoTestBase, self).assertEqual(first, second, msg=msg)
      failureException: {('\x0b\xee\xc7\xb5\xea?\x0f\xdb\xc9]\r\xd4\x7f<[\xc2u\xda\x8a3', 0): 0} != {('\x0b\xee\xc7\xb5\xea?\x0f\xdb\xc9]\r\xd4\x7f<[\xc2u\xda\x8a3', 0): 1}
      Julien Muchembled committed
    • Several improvements to verbose locks · 5dc1f06c
      All these changes were useful to debug deadlocks in threaded tests:
      - New verbose Semaphore.
      - Logs with numerical 'ident' were too annoying to read so revert to thread
        name (before commit 5b69d553), with an
        exception for threaded tests. There remains one case where the result is not
        unique: when several client apps are instantiated.
      - Make deadlock detection optional.
      - Make it possible to name locks.
      - Make output more compact.
      - Remove useless 'debug_lock' option.
      - Add timing information.
      - Make exception more verbose when an un-acquired lock is released.
      
      Here is how I used 'locking':
      
      --- a/neo/tests/threaded/__init__.py
      +++ b/neo/tests/threaded/__init__.py
      @@ -37,0 +38 @@
      +from neo.lib.locking import VerboseSemaphore
      @@ -71 +72,2 @@ def init(cls):
      -        cls._global_lock = threading.Semaphore(0)
      +        cls._global_lock = VerboseSemaphore(0, check_owner=False,
      +                                            name="Serialized._global_lock")
      @@ -265 +267,2 @@ def start(self):
      -        self.em._lock = l = threading.Semaphore(0)
      +        self.em._lock = l = VerboseSemaphore(0, check_owner=False,
      +                                             name=self.node_name)
      @@ -346 +349,2 @@ def __init__(self, master_nodes, name, **kw):
      -        self.em._lock = threading.Semaphore(0)
      +        self.em._lock = VerboseSemaphore(0, check_owner=False,
      +                                         name=repr(self))
      Julien Muchembled committed
    • Fix occasional deadlocks in threaded tests · 0b93b1fb
      deadlocks mainly happened while stopping a cluster, hence the complete review
      of NEOCluster.stop()
      
      A major change is to make the client node handle its lock like other nodes
      (i.e. in the polling thread itself) to better know when to call
      Serialized.background() (there was a race condition with the test of
      'self.poll_thread.isAlive()' in ClientApplication.close).
      Julien Muchembled committed
  5. 14 Aug, 2015 2 commits
  6. 12 Aug, 2015 16 commits
  7. 28 Jul, 2015 1 commit
  8. 13 Jul, 2015 2 commits
  9. 10 Jul, 2015 1 commit
  10. 09 Jul, 2015 1 commit
  11. 03 Jul, 2015 1 commit