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


_______________________________________________
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to