[ClusterLabs] pcs testsuite fail: test_run_all_workers
    Valentin Vidic 
    Valentin.Vidic at CARNet.hr
       
    Mon Jul 25 18:43:33 UTC 2016
    
    
  
FAIL: test_run_all_workers (pcs.test.test_utils.RunParallelTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pcs/test/test_utils.py", line
1800, in test_run_all_workers
    self.assertEqual(log, ['first', 'second'])
AssertionError: Lists differ: [u'second', u'first'] != [u'first', u'second']
First differing element 0:
u'second'
u'first'
- [u'second', u'first']
+ [u'first', u'second']
Is it realistic to expect the threads to always finish in the same order
if the wait time is the same for both?  Perhaps it would be better to
check sorted(log) in this tests:
    def test_run_all_workers(self):
        log = []
        utils.run_parallel(
            [   
                self.fixture_create_worker(log, 'first'),
                self.fixture_create_worker(log, 'second'),
            ],
            wait_seconds=.1
        )
        self.assertEqual(log, ['first', 'second'])
-- 
Valentin
    
    
More information about the Users
mailing list