MCPcopy Create free account
hub / github.com/grpc/grpc-java / finished

Method finished

xds/src/test/java/io/grpc/xds/DataPlaneRule.java:106–126  ·  view source on GitHub ↗
(Description description)

Source from the content-addressed store, hash-verified

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];

Callers 1

inflateMethod · 0.45

Calls 4

shutdownNowMethod · 0.65
isShutdownMethod · 0.45
awaitTerminationMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected