Now TextReport listener is not thread-safe.
When I run a set of tests in 2+ threads in parallel, some tests have an empty sample text report despite tests passed. In other words, console report table is empty for some tests.
Issue never happens when I run tests in a single thread sequentially, console report tables are filled in for all tests.
I found that there is really an issue with TextReport. It works differently with JUnit and TestNG.
public TestRule report = new TextReport();
JUnit creates a new TextReport instance before every test.
TestNG creates only one instance of listener and re-uses it for all the tests. That's why we have a concurrency issue.
Fixes #364 #303 class SimpleReport is now thread-safe
it doesn't hold a single instance of EventsCollector, but creates a new one for every thread
Fixes #364 #303 class SoftAsserts is now thread-safe
it doesn't hold a single instance of ErrorsCollector, but creates a new one for every test
Fixes #364 #303 JUnit implementation of SoftAsserts uses the same pat…
…tern as TestNG's one.