title: PlaySlick running multiple specs2 testcases throws an error for the later one of MYSQL connection rejected
body: <p>I have written a few testcases with specs2 in play framework using Slick with MySQL database connection. A Database Connection rejected error is thrown for the later testcase, hence results in failure.</p>
  
  <p>the error thrown is </p>
  
  <p><strong>Task slick.backend.DatabaseComponent$DatabaseDef$$anon$2@4877c5d rejected from java.util.concurrent.ThreadPoolExecutor@48e736[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1] (DatabaseComponent.scala:230)</strong></p>
  
  <p>The code for testcase is written in this format - </p>
  
  <pre><code>class tryTests extends PlaySpecification{
   "Application" should { 
         "test1" in new WithApplication{
              /* Some tests 
          }
         "test2" in new WithApplication{
              /* Some tests 
          }
   }
  </code></pre>
  
  <p>}</p>
  
  <p>So the test1 will succeed successfully but test2 will fail with above mentioned error.</p>
  
  <p>The sollutions that I've tried so far are </p>
  
  <ol>
  <li>using the "sequential" keyword</li>
  <li>using the function override method for "is" </li>
  <li>trying to connect with database in "before" part "with BeforeAfterEach" </li>
  </ol>
  
  <p>Above 3 mentioned methods did not work out. Till now according to my understanding the problem is that testcases are being executed concurrently and each one disconnects the database connection. So the later testcase is not able to access the same.</p>
  
  <p>Any suggestion for this problem !!!</p>