File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ class ExecutorMixin:
109109 def setUp (self ):
110110 super ().setUp ()
111111
112- self .t1 = time .time ()
112+ self .t1 = time .monotonic ()
113113 if hasattr (self , "ctx" ):
114114 self .executor = self .executor_type (
115115 max_workers = self .worker_count ,
@@ -125,10 +125,10 @@ def tearDown(self):
125125 self .executor .shutdown (wait = True )
126126 self .executor = None
127127
128- dt = time .time () - self .t1
128+ dt = time .monotonic () - self .t1
129129 if test .support .verbose :
130130 print ("%.2fs" % dt , end = ' ' )
131- self .assertLess (dt , 60 , "synchronization issue: test lasted too long" )
131+ self .assertLess (dt , 300 , "synchronization issue: test lasted too long" )
132132
133133 super ().tearDown ()
134134
@@ -240,9 +240,9 @@ def test_initializer(self):
240240 with self .assertRaises (BrokenExecutor ):
241241 future .result ()
242242 # At some point, the executor should break
243- t1 = time .time ()
243+ t1 = time .monotonic ()
244244 while not self .executor ._broken :
245- if time .time () - t1 > 5 :
245+ if time .monotonic () - t1 > 5 :
246246 self .fail ("executor not broken after 5 s." )
247247 time .sleep (0.01 )
248248 # ... and from this point submit() is guaranteed to fail
You can’t perform that action at this time.
0 commit comments