protected void finish() {
      DataOutputStream os = null;
      try {
        if (mySocket == null || mySocket.isClosed()) return;
        os = new DataOutputStream(mySocket.getOutputStream());
        os.writeBoolean(true);
      } catch (Throwable e) {
        LOG.info(e);
      } finally {
        try {
          if (os != null) os.close();
        } catch (Throwable e) {
          LOG.info(e);
        }

        try {
          if (!myServerSocket.isClosed()) {
            myServerSocket.close();
          }
        } catch (Throwable e) {
          LOG.info(e);
        }
      }
    }
 public void run(@NotNull ProgressIndicator indicator) {
   try {
     mySocket = myServerSocket.accept();
     DumbService.getInstance(myProject)
         .repeatUntilPassesInSmartMode(
             new Runnable() {
               @Override
               public void run() {
                 myClasses.clear();
                 myJunit4[0] = ConfigurationUtil.findAllTestClasses(myClassFilter, myClasses);
               }
             });
     myFoundTests = !myClasses.isEmpty();
   } catch (IOException e) {
     LOG.info(e);
   } catch (Throwable e) {
     LOG.error(e);
   }
 }