(Description description)
| 104 | } |
| 105 | |
| 106 | @Override |
| 107 | protected void finished(Description description) { |
| 108 | if (server != null) { |
| 109 | // Shut down any lingering open channels to the server. |
| 110 | for (ManagedChannel channel : channels) { |
| 111 | if (!channel.isShutdown()) { |
| 112 | channel.shutdownNow(); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // Shut down the server itself. |
| 117 | server.shutdownNow(); |
| 118 | try { |
| 119 | if (!server.awaitTermination(5, TimeUnit.SECONDS)) { |
| 120 | logger.log(Level.SEVERE, "Timed out waiting for server shutdown"); |
| 121 | } |
| 122 | } catch (InterruptedException e) { |
| 123 | throw new AssertionError("unable to shut down data plane server", e); |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | private void startServer(Map<String, ?> bootstrapOverride) throws Exception { |
| 129 | final String[] authority = new String[1]; |
no test coverage detected