File tree Expand file tree Collapse file tree
tika-grpc/src/test/java/org/apache/tika/pipes/grpc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,10 +205,11 @@ private static String createFetcherId(int i) {
205205 public void testBiStream (Resources resources ) throws Exception {
206206 String serverName = InProcessServerBuilder .generateName ();
207207
208+ TikaGrpcServerImpl tikaGrpcServerImpl = new TikaGrpcServerImpl (tikaConfig .toAbsolutePath ().toString ());
208209 Server server = InProcessServerBuilder
209210 .forName (serverName )
210211 .directExecutor ()
211- .addService (new TikaGrpcServerImpl ( tikaConfig . toAbsolutePath (). toString ()) )
212+ .addService (tikaGrpcServerImpl )
212213 .build ()
213214 .start ();
214215 resources .register (server , Duration .ofSeconds (10 ));
@@ -306,6 +307,10 @@ public void onCompleted() {
306307 assertEquals (NUM_TEST_DOCS , successes .size ());
307308 assertEquals (1 , errors .size ());
308309 assertTrue (finished .get ());
310+
311+ tikaGrpcServerImpl .shutdown ();
312+ server .shutdown ();
313+ tikaGrpcServerImpl .postShutdown ();
309314 } finally {
310315 FileUtils .deleteDirectory (testDocumentFolder );
311316 }
You can’t perform that action at this time.
0 commit comments