title: Exclude specific tests from being run in parallel in jUnit
body: <p>I recently stumbled upon a simple way to parallelize the execute of tests via jUnit by specifying the following in a java project's pom.xml file:</p>
  
  <pre><code>&lt;plugin&gt;
   &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
   &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
   &lt;configuration&gt;
    &lt;parallel&gt;classes&lt;/parallel&gt;
   &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>I've discovered that there are 2 test-classes (let's call them "badtestclass1" and "badtestclass2") that keep getting penalized by this parallel execution due to the way the tests in them have been written. Ideally, I would refactor those test-classes to behave better, but in the interim, I was wondering if there's a nifty way to "exclude" these specific classes from being executed in parallel. Basically, is there a way to execute everything else in parallel and then these 2 in sequence (or the other order, doesn't matter). Would something like the following work?</p>
  
  <pre><code>&lt;plugin&gt;
   &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
   &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
   &lt;configuration&gt;
    &lt;parallel&gt;classes&lt;/parallel&gt;
    &lt;excludes&gt;
     &lt;excludesFile&gt;badtestclass1&lt;/excludesFile&gt;
     &lt;excludesFile&gt;badtestclass2&lt;/excludesFile&gt;
    &lt;/excludes&gt;
   &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>