fix some utils tests for newer platforms
1. error message has changed in a library 2. multiprocessing can't handle a local function anymore
This commit is contained in:
parent
930a285e60
commit
7bf0ae833a
1 changed files with 9 additions and 7 deletions
|
|
@ -827,7 +827,7 @@ class MavenUtilTestCase(unittest.TestCase):
|
|||
# invalid month
|
||||
'2000-13-32': 'month must be in 1..12',
|
||||
# invalid day
|
||||
'2000-12-32': 'day is out of range for month',
|
||||
'2000-12-32': 'day.*',
|
||||
# invalid hour
|
||||
'2000-12-31 24:61:61': 'hour must be in 0..23',
|
||||
# invalid minute
|
||||
|
|
@ -835,7 +835,7 @@ class MavenUtilTestCase(unittest.TestCase):
|
|||
# invalid second
|
||||
'2000-12-31 23:59:61': 'second must be in 0..59',
|
||||
# corner case, leap day
|
||||
'1969-2-29': 'day is out of range for month'
|
||||
'1969-2-29': 'day.*'
|
||||
}
|
||||
|
||||
# invalid date test
|
||||
|
|
@ -1924,13 +1924,9 @@ class TestRmtree2(unittest.TestCase):
|
|||
|
||||
sync = multiprocessing.Event()
|
||||
|
||||
def do_rmtree(dirname):
|
||||
sync.wait()
|
||||
koji.util.rmtree(dirname)
|
||||
|
||||
procs = []
|
||||
for n in range(3):
|
||||
proc = multiprocessing.Process(target=do_rmtree, args=(dirname,))
|
||||
proc = multiprocessing.Process(target=sync_rmtree, args=(sync, dirname,))
|
||||
proc.start()
|
||||
procs.append(proc)
|
||||
sync.set()
|
||||
|
|
@ -1962,6 +1958,12 @@ class TestRmtree2(unittest.TestCase):
|
|||
raise Exception('test directory not removed')
|
||||
|
||||
|
||||
def sync_rmtree(sync, dirname):
|
||||
"""Wait for a sync, then call rmtree"""
|
||||
sync.wait()
|
||||
koji.util.rmtree(dirname)
|
||||
|
||||
|
||||
class TestProxyLogger(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue