anchor.diff:    Future subscribeToStatusNotifications() async {
       await sendServerSetSubscriptions([ServerService.STATUS]);
     }
  +
  +  static Future<int> _findAvailableSocketPort() async {
  +    var socket = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
  +    try {
  +      return socket.port;
  +    } finally {
  +      await socket.close();
  +    }
  +  }
   }
  
positive.code:       outOfTestExpect(serverConnected.isCompleted, isFalse);
        serverConnected.complete();
      });
      return startServer(servicesPort: vmServicePort).then((_) {
        server.listenToOutput(dispatchNotification);
        server.exitCode.then((_) {
          skipShutdown = true;
  
negative.code:    * The server is automatically started before every test.
     */
    @override
    Future setUp() async {
      _vmServicePort = await _findAvailableSocketPort();
  
      onAnalysisErrors.listen((AnalysisErrorsParams params) {
        currentAnalysisErrors[params.file] = params.errors;
      });
  