Try to prevent this test from being flaky. We might need a sleep in here
which isn't as bad as it sounds. The close() *should* raise an exception, so if it didn't we should give more time to sync and really raise it. Will backport.
This commit is contained in:
parent
6e070814b2
commit
46c61b2c1d
|
@ -54,7 +54,11 @@ class ResourceTest(unittest.TestCase):
|
|||
f.write("Y")
|
||||
f.flush()
|
||||
# On some systems (e.g., Ubuntu on hppa) the flush()
|
||||
# doesn't cause the exception, but the close() does.
|
||||
# doesn't always cause the exception, but the close()
|
||||
# does eventually. Try closing several times in
|
||||
# an attempt to ensure the file is really synced and
|
||||
# the exception raised.
|
||||
for i in range(5):
|
||||
f.close()
|
||||
except IOError:
|
||||
if not limit_set:
|
||||
|
|
Loading…
Reference in New Issue