From f72bc13111ebfdee95ece936d95fcae961748826 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 25 Mar 2013 16:33:02 -0400 Subject: [PATCH] BF: allow to wait longer for FilterPoll in test_move_file --- testcases/filtertestcase.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testcases/filtertestcase.py b/testcases/filtertestcase.py index 88cbf382..4aef2c9d 100644 --- a/testcases/filtertestcase.py +++ b/testcases/filtertestcase.py @@ -432,9 +432,10 @@ def get_monitor_failures_testcase(Filter_): # if we move file into a new location while it has been open already self.file = _copy_lines_between_files(GetFailures.FILENAME_01, self.name, n=14, mode='w') - self.assertTrue(self.isEmpty(2)) + # Poll might need more time + self.assertTrue(self.isEmpty(2 + int(isinstance(self.filter, FilterPoll))*4)) self.assertRaises(FailManagerEmpty, self.filter.failManager.toBan) - self.assertEqual(self.filter.failManager.getFailTotal(), 2) # Fails with Poll from time to time + self.assertEqual(self.filter.failManager.getFailTotal(), 2) # move aside, but leaving the handle still open... os.rename(self.name, self.name + '.bak')