title: How to access H2 database console during test debug
body: <p>I'm writing tests for my repository in SpringBoot application. On production I have working MySql DB, but for testing purposes I'm trying to use H2 in-memory DB. 
  It appears to work correctly - there are SQL queries flying in console.</p>
  
  <p>The question is how I can access H2 console page while testing application. When I set a breakpoint in test method I can't access console in browser.</p>
  
  <p>I tried setting up breakpoints that suspends the test thread only (no luck).</p>
  
  <p>When I switch my production DB from MySql to H2, I'm able to access the console, everything works as I suspect it should.  No break point is needed in opposite to tests - 'normal' application runs endlessly waiting for HTTP requests.</p>
  
  <p>Simple test class I use:</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest()
  public class StockRepositoryTest {
      @Autowired
      private StockRepository stockRepository;
  
      @Test
      public void Should_persist_deviceItem(){
          DeviceItem deviceItem = SampleStock.s1_d1;
          stockRepository.save(deviceItem);
          Optional&lt;DeviceItem&gt; foundById = stockRepository.findById(SampleStock.s1_d1.getId());
  
          Assert.assertTrue(foundById.isPresent());
      }
  </code></pre>
  
  <p>I expect that when I put a break point on line in test method, while the code is suspended, I can access H2 database console and check state of data. 
  Right now I'm not getting any response on H2 console URL (not even HTTP error code). </p>
  
  <p>Thanks, regards
  Peter</p>