title: Console output in parallel tests shown in different test tree, than was launched in
body: <p>I'm using TestNG 6.8.8 in Intellij IDEA 13.4, logback 1.1.2. I have bunch of test classes, and have xml launcher like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite name="Example" parallel="tests" thread-count="3"&gt;
  
  &lt;test name="test1"&gt;
      &lt;classes&gt;
          &lt;class name="ExampleClass1"/&gt;
      &lt;/classes&gt;
  &lt;/test&gt;
  &lt;test name="test2"&gt;
      &lt;classes&gt;
          &lt;class name="ExampleClass2"/&gt;
      &lt;/classes&gt;
  &lt;/test&gt;
  &lt;test name="test3"&gt;
      &lt;classes&gt;
          &lt;class name="ExampleClass3"/&gt;
      &lt;/classes&gt;
  &lt;/test&gt;
  </code></pre>
  
  <p>also, each class have MDC mark to distinct test classes:</p>
  
  <pre><code> MDC.put("testName", "ExampleClass1");
  </code></pre>
  
  <p>and logback.xml:</p>
  
  <pre><code>&lt;configuration&gt;
  
  &lt;appender name="console" class="ch.qos.logback.core.ConsoleAppender"&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;%d{HH:mm:ss.SSS} %C [%X{testName}]  - %m%n&lt;/pattern&gt;
      &lt;/encoder&gt;
      &lt;filter class="ch.qos.logback.classic.filter.ThresholdFilter"&gt;
          &lt;level&gt;INFO&lt;/level&gt;
      &lt;/filter&gt;
  &lt;/appender&gt;
  
  &lt;root level="debug"&gt;
      &lt;appender-ref ref="console" /&gt;
  &lt;/root&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>when I change xml runner to thread-count="1" everything is fine - console logs each test in it's own tree node.</p>
  
  <p>But when i run TestNG with thread-count="3" or more, some log entries shown not in their own test tree node, but in some others.</p>
  
  <p>for example, console output in tree node for test "test1" can be:</p>
  
  <pre><code>11:53:28.388 ExampleClass1 [ExampleClass1]  - logEntry
  11:53:28.388 ExampleClass2 [ExampleClass2]  - logEntry
  11:53:29.800 ExampleClass1 [ExampleClass1]  - logEntry2
  11:53:29.958 ExampleClass2 [ExampleClass2]  - logEntry2
  </code></pre>
  
  <p>So, log entry of class ExampleClass2 is shown as result of execution of ExampleClass1, while console output in tree node for test "test2" is empty.
  also, xml export of console output shows, that some log values goes to different test results.</p>
  
  <p>How Intellij desides for each output line which test is responsible for?
  Is there any way to enforce Intellij IDEA to somehow check which log entry which class is responsible for by MDC mark?
  or is there any other way to make sure console output is on it's place in test tree?</p>