Skip to content

Commit fd84969

Browse files
ajdavisbehackett
authored andcommitted
Revert "Python 3.4 compatibility in test_selection_failure."
This reverts commit 1ec4ab3.
1 parent 28ca78a commit fd84969

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

test/test_topology.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -583,26 +583,11 @@ def test_selection_failure(self):
583583
# While ismaster fails, ensure it's called about every 10 ms.
584584
timeouts = []
585585

586-
class TestCondition(object):
587-
def __init__(self, lock=None):
588-
self.condition = threading.Condition(lock)
589-
590-
def acquire(self):
591-
return self.condition.acquire()
592-
593-
def release(self):
594-
self.condition.release()
595-
586+
class TestCondition(threading._Condition):
596587
def wait(self, timeout=None):
597588
assert timeout is not None
598589
timeouts.append(timeout)
599-
self.condition.wait(timeout)
600-
601-
def notify(self, n=1):
602-
self.condition.notify(n)
603-
604-
def notify_all(self):
605-
self.condition.notify_all()
590+
super(TestCondition, self).wait(timeout)
606591

607592
def timer():
608593
return sum(timeouts)

0 commit comments

Comments
 (0)