示例#1
0
  @Override
  protected void tearDown() {
    notFinished = false;
    try {
      serverThread.join();
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    }
    try {
      clientThread.join();
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    }

    // The server must have completed without an exception.
    if (server.getException() != null) {
      throw new RuntimeException(server.getException());
    }

    // The client must have completed without an exception.
    if (client.getException() != null) {
      throw new RuntimeException(client.getException());
    }
  }