@@ -581,6 +581,8 @@ public void testTracingSuccessIpc() throws IOException, ServiceException {
581581 everyItem (allOf (hasStatusWithCode (StatusCode .OK ),
582582 hasTraceId (traceRule .getSpans ().iterator ().next ().getTraceId ()),
583583 hasDuration (greaterThanOrEqualTo (Duration .ofMillis (100L ))))));
584+ } finally {
585+ rpcServer .stop ();
584586 }
585587 }
586588
@@ -609,6 +611,8 @@ public void testTracingErrorIpc() throws IOException {
609611 assertFalse ("no spans provided" , traceRule .getSpans ().isEmpty ());
610612 assertThat (traceRule .getSpans (), everyItem (allOf (hasStatusWithCode (StatusCode .ERROR ),
611613 hasTraceId (traceRule .getSpans ().iterator ().next ().getTraceId ()))));
614+ } finally {
615+ rpcServer .stop ();
612616 }
613617 }
614618
@@ -670,6 +674,8 @@ public void testGetConnectionRegistry() throws IOException, ServiceException {
670674 GetConnectionRegistryResponse resp =
671675 stub .getConnectionRegistry (null , GetConnectionRegistryRequest .getDefaultInstance ());
672676 assertEquals (clusterId , resp .getClusterId ());
677+ } finally {
678+ rpcServer .stop ();
673679 }
674680 }
675681
@@ -701,6 +707,8 @@ public void testGetConnectionRegistryError() throws IOException, ServiceExceptio
701707 assertEquals (FatalConnectionException .class .getName (),
702708 ((RemoteException ) pcrc .getFailed ()).getClassName ());
703709 assertThat (pcrc .getFailed ().getMessage (), startsWith ("Expected HEADER=" ));
710+ } finally {
711+ rpcServer .stop ();
704712 }
705713 }
706714}
0 commit comments