title: Allure and parallel test execution - listener is adding 5sec before next test starts
body: <p>I have a problem with Allure listener (<a href="https://docs.qameta.io/allure/2.0/#_java" rel="nofollow noreferrer">https://docs.qameta.io/allure/2.0/#_java</a>). I can't execut tests in parallel mode. Here is code:</p>
  
  <p>Test class (class content):</p>
  
  <pre><code>    public class Parallel {
  
      @Test
      public void test1() throws InterruptedException {
  
          Thread.sleep(3000);
          System.out.println(Calendar.getInstance().getTime());
          Assert.assertEquals(1, 1);
      }
  
      @Test
      public void test2() throws InterruptedException {
  
          Thread.sleep(3000);
          System.out.println(Calendar.getInstance().getTime());
          Assert.assertEquals(1, 1);
      }
  
      @Test
      public void test3() throws InterruptedException {
  
          Thread.sleep(3000);
          System.out.println(Calendar.getInstance().getTime());
          Assert.assertEquals(1, 1);
      }
  }
  </code></pre>
  
  <p>Suite class:</p>
  
  <pre><code>@RunWith(Suite.class)
  @Suite.SuiteClasses({Parallel.class})
  public class ParallelSuite {
  
  }
  </code></pre>
  
  <p>Tests are running via mvn: </p>
  
  <pre><code>mvn clean compile test-compile -DfailIfNoTests=false -Dtest=ParallelSuite test
  </code></pre>
  
  <p>Parallel test execution from pom.xml:</p>
  
  <pre><code>&lt;parallel&gt;suitesAndMethods&lt;/parallel&gt;
  &lt;useUnlimitedThreads&gt;true&lt;/useUnlimitedThreads&gt;
  </code></pre>
  
  <p>When I run this tests I got printed [all is OK]:</p>
  
  <pre><code>Fri Nov 17 13:45:07 CET 2017
  Fri Nov 17 13:45:07 CET 2017
  Fri Nov 17 13:45:07 CET 2017
  </code></pre>
  
  <p>Here I can see that all 3 tests are executed in parallel. But when I enable Allure listener every test execution is shifted for 2sec. So, tests are executed in sequential order instead in parallel.</p>
  
  <p>Here is configuration for listener from pom.xml:</p>
  
  <pre><code>&lt;argLine&gt;
  -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                      &lt;/argLine&gt;
                      &lt;properties&gt;
                          &lt;property&gt;
                              &lt;name&gt;listener&lt;/name&gt;
                              &lt;value&gt;io.qameta.allure.junit4.AllureJunit4&lt;/value&gt;
                          &lt;/property&gt;
                      &lt;/properties&gt;
  </code></pre>
  
  <p>And here is output where are times logged:</p>
  
  <pre><code>Fri Nov 17 13:55:58 CET 2017
  Fri Nov 17 13:56:03 CET 2017
  Fri Nov 17 13:56:08 CET 2017
  </code></pre>
  
  <p>How to setup Allure listener to execute tests in parallel mode?
  <a href="https://i.stack.imgur.com/FutOt.png" rel="nofollow noreferrer">Allure demo screenshot</a></p>