mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Wait until after restoring original resource limit before removing temp files
Invoking shutil.rmtree() first was causing a traceback since the max open files setting was still set very low for the test. This moves the shutil.rmtree() until after we have restored the original resource limit.
This commit is contained in:
parent
4eb248b129
commit
b6ccfb45c8
@ -250,11 +250,11 @@ class TestVerify(TestCase):
|
||||
self.skipTest('We\'ve hit the max open files setting')
|
||||
raise
|
||||
finally:
|
||||
shutil.rmtree(tempdir)
|
||||
if sys.platform.startswith('win'):
|
||||
win32file._setmaxstdio(mof_h)
|
||||
else:
|
||||
resource.setrlimit(resource.RLIMIT_NOFILE, (mof_s, mof_h))
|
||||
shutil.rmtree(tempdir)
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
def test_verify_log(self):
|
||||
|
Loading…
Reference in New Issue
Block a user