File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments