title: Micronaut Random Port fails to start Tests
body: <p>I maintain quite a big micronaut application with thousands of tests. Recently I've migrated to Azure and start seeing these flaky tests with this error</p>
  <pre><code>Test initializationError FAILED
  
  io.micronaut.http.server.exceptions.ServerStartupException: Unable to start Micronaut server on port: 43218
  </code></pre>
  <p>application-test.yml</p>
  <pre><code>---
  micronaut:
    server:
      port: ${random.port}
  </code></pre>
  <p>example Test</p>
  <pre><code>@MicronautTest 
  class MathServiceSpec extends Specification {
  
     @Inject
     MathService mathService 
  
     @Unroll
     void &quot;should compute #num times 4&quot;() { 
         when:
         def result = mathService.compute(num)
  
         then:
         result == expected
  
         where:
         num | expected
         2   | 8
         3   | 12
     }
  </code></pre>
  <p>I can't see any obvious reason why micronaut picks a port in use for the random.port, or why this only started happening after migrating to Azure as there is no obvious connection I can make.</p>