Revision 63f2e724 test/ganeti.locking_unittest.py

b/test/ganeti.locking_unittest.py
52 52
  """Test class that supports adding/waiting on threads"""
53 53
  def setUp(self):
54 54
    unittest.TestCase.setUp(self)
55
    self.done = Queue.Queue(0)
55 56
    self.threads = []
56 57

  
57 58
  def _addThread(self, *args, **kwargs):
......
76 77
    _ThreadedTestCase.setUp(self)
77 78
    self.lock = threading.Lock()
78 79
    self.cond = locking._PipeCondition(self.lock)
79
    self.done = Queue.Queue(0)
80 80

  
81 81
  def testAcquireRelease(self):
82 82
    self.assert_(not self.cond._is_owned())
......
280 280
  def setUp(self):
281 281
    _ThreadedTestCase.setUp(self)
282 282
    self.sl = locking.SharedLock()
283
    # helper threads use the 'done' queue to tell the master they finished.
284
    self.done = Queue.Queue(0)
285 283

  
286 284
  def testSequenceAndOwnership(self):
287 285
    self.assert_(not self.sl._is_owned())
......
725 723

  
726 724
  def setUp(self):
727 725
    _ThreadedTestCase.setUp(self)
728
    # helper threads use the 'done' queue to tell the master they finished.
729
    self.done = Queue.Queue(0)
730 726

  
731 727
  @locking.ssynchronized(_decoratorlock)
732 728
  def _doItExclusive(self):
......
785 781
  def setUp(self):
786 782
    _ThreadedTestCase.setUp(self)
787 783
    self._setUpLS()
788
    # helper threads use the 'done' queue to tell the master they finished.
789
    self.done = Queue.Queue(0)
790 784

  
791 785
  def _setUpLS(self):
792 786
    """Helper to (re)initialize the lock set"""
......
1138 1132
    self.instances=['i1', 'i2', 'i3']
1139 1133
    self.GL = locking.GanetiLockManager(nodes=self.nodes,
1140 1134
                                        instances=self.instances)
1141
    self.done = Queue.Queue(0)
1142 1135

  
1143 1136
  def tearDown(self):
1144 1137
    # Don't try this at home...

Also available in: Unified diff