[ClusterLabs] pcs testsuite fail: test_run_all_workers

Tomas Jelinek tojeline at redhat.com
Tue Jul 26 04:24:06 EDT 2016


Dne 25.7.2016 v 20:43 Valentin Vidic napsal(a):
> 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:

Hi Valentin,

It's a bug in the test, thanks for pointing this out. Fixed in upstream.

Regards,
Tomas

>
>     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'])
>




More information about the Users mailing list