Commit dd2773af authored by Neal Norwitz's avatar Neal Norwitz

Backport 60342:

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.
parent 0bbdc8fc
...@@ -37,7 +37,10 @@ try: ...@@ -37,7 +37,10 @@ try:
f.write("Y") f.write("Y")
f.flush() f.flush()
# On some systems (e.g., Ubuntu on hppa) the 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() f.close()
except IOError: except IOError:
if not limit_set: if not limit_set:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment