zebrunner / carina-webdriver

Apache License 2.0
7 stars 10 forks source link

All tests fail when l10n.assertAll called in one of the tests while multithreading #116

Open dmtgrinevich opened 1 year ago

dmtgrinevich commented 1 year ago

Bug reproduce: 1) add L10N.assertAll() into several test methods 2) L10N.assertAll() should contain at least one fail assert 3) launch test methods in multithread

akamarouski commented 1 year ago

@dmtgrinevich please retest with the latest carina

dmtgrinevich commented 1 year ago

For example we got tests:

  @Test()
    public void t1() {
        ...
        L10N.assertAll();
    }

    @Test()
    public void t2() {
        ...
        L10N.assertAll();
    }

    @Test
    public void t3() {
        ...
        L10N.assertAll();
    }

Imagine we launch them in one thread. If L10N.assertAll() in t1() method generate's assertion, than this assertion will be included in all other calls of L10N.assertAll() in t2() and t3() and those tests will fail even if no new assertions were found.

While multithreading the latest completed tests will include all assertions from earlier ones