@@ -53,8 +53,8 @@ private PipesClient init(Path tmp, String testFileName) throws Exception {
5353 PluginsTestHelper .copyTestFilesToTmpInput (tmp , testFileName );
5454
5555 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
56- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
57- return new PipesClient (pipesConfig );
56+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
57+ return new PipesClient (pipesConfig , tikaConfigPath );
5858 }
5959
6060 @ Test
@@ -137,9 +137,9 @@ public void testRuntimeTimeoutChange(@TempDir Path tmp) throws Exception {
137137
138138 Path tikaConfigPath = PluginsTestHelper .getFileSystemFetcherConfig (tmp , inputDir , tmp .resolve ("output" ));
139139 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
140- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
140+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
141141
142- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
142+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
143143 // First test: Short timeout (1 second) - should timeout
144144 ParseContext shortTimeoutContext = new ParseContext ();
145145 shortTimeoutContext .set (TikaTaskTimeout .class , new TikaTaskTimeout (1000 ));
@@ -176,9 +176,9 @@ public void testStartupFailure(@TempDir Path tmp) throws Exception {
176176 "tika-config-bad-class.json" , tmp );
177177
178178 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
179- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
179+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
180180
181- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
181+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
182182 FetchEmitTuple tuple = new FetchEmitTuple (testDoc ,
183183 new FetchKey ("bad-fetcher" , testDoc ),
184184 new EmitKey (), new Metadata (), new ParseContext (),
@@ -205,9 +205,9 @@ public void testJvmStartupFailure(@TempDir Path tmp) throws Exception {
205205 PluginsTestHelper .copyTestFilesToTmpInput (tmp , testDoc );
206206
207207 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
208- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
208+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
209209
210- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
210+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
211211 FetchEmitTuple tuple = new FetchEmitTuple (testDoc ,
212212 new FetchKey ("fsf" , testDoc ),
213213 new EmitKey (), new Metadata (), new ParseContext (),
@@ -233,9 +233,9 @@ public void testFailureBeforeJvm(@TempDir Path tmp) throws Exception {
233233 PluginsTestHelper .copyTestFilesToTmpInput (tmp , testDoc );
234234
235235 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
236- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
236+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
237237
238- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
238+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
239239 FetchEmitTuple tuple = new FetchEmitTuple (testDoc ,
240240 new FetchKey ("fsf" , testDoc ),
241241 new EmitKey (), new Metadata (), new ParseContext (),
@@ -259,9 +259,9 @@ public void testCrashDuringDetection(@TempDir Path tmp) throws Exception {
259259 PluginsTestHelper .copyTestFilesToTmpInput (tmp , testDoc );
260260
261261 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
262- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
262+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
263263
264- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
264+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
265265 FetchEmitTuple tuple = new FetchEmitTuple (testDoc ,
266266 new FetchKey ("fsf" , testDoc ),
267267 new EmitKey (), new Metadata (), new ParseContext (),
@@ -309,7 +309,7 @@ public void testSocketTimeout(@TempDir Path tmp) throws Exception {
309309 "tika-config-timeout-lt-heartbeat.json" , tmp );
310310
311311 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
312- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
312+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
313313
314314 // Verify the misconfiguration that triggers socket timeout
315315 assertEquals (3000 , pipesConfig .getSocketTimeoutMs (), "Socket timeout should be 3 seconds" );
@@ -319,7 +319,7 @@ public void testSocketTimeout(@TempDir Path tmp) throws Exception {
319319
320320 // The config file includes -Dtika.pipes.allowInvalidHeartbeat=true in forkedJvmArgs
321321 // to allow this invalid configuration for testing only
322- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
322+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
323323 FetchEmitTuple tuple = new FetchEmitTuple (testFile ,
324324 new FetchKey ("fsf" , testFile ),
325325 new EmitKey (), new Metadata (), new ParseContext (),
@@ -362,9 +362,9 @@ public void testParseSuccessWithException(@TempDir Path tmp) throws Exception {
362362
363363 Path tikaConfigPath = PluginsTestHelper .getFileSystemFetcherConfig (tmp , inputDir , tmp .resolve ("output" ));
364364 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
365- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
365+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
366366
367- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
367+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
368368 FetchEmitTuple tuple = new FetchEmitTuple (testFile ,
369369 new FetchKey (fetcherName , testFile ),
370370 new EmitKey (emitterName , "" ), new Metadata (), new ParseContext (),
@@ -396,9 +396,9 @@ public void testFetchException(@TempDir Path tmp) throws Exception {
396396
397397 Path tikaConfigPath = PluginsTestHelper .getFileSystemFetcherConfig (tmp , inputDir , tmp .resolve ("output" ));
398398 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
399- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
399+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
400400
401- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
401+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
402402 // Request a file that doesn't exist
403403 String nonExistentFile = "does-not-exist.pdf" ;
404404 FetchEmitTuple tuple = new FetchEmitTuple (nonExistentFile ,
@@ -450,9 +450,9 @@ public void testEmitException(@TempDir Path tmp) throws Exception {
450450 // Config has onExists=EXCEPTION which will trigger FileAlreadyExistsException
451451 Path tikaConfigPath = PluginsTestHelper .getFileSystemFetcherConfig ("tika-config-emit-all.json" , tmp , inputDir , outputDir , false );
452452 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
453- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
453+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
454454
455- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
455+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
456456 FetchEmitTuple tuple = new FetchEmitTuple (testFile ,
457457 new FetchKey (fetcherName , testFile ),
458458 new EmitKey (emitterName , "" ), new Metadata (), new ParseContext (),
@@ -479,9 +479,9 @@ public void testFetcherNotFound(@TempDir Path tmp) throws Exception {
479479
480480 Path tikaConfigPath = PluginsTestHelper .getFileSystemFetcherConfig (tmp , inputDir , tmp .resolve ("output" ));
481481 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
482- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
482+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
483483
484- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
484+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
485485 // Use invalid fetcher name
486486 FetchEmitTuple tuple = new FetchEmitTuple ("test.pdf" ,
487487 new FetchKey ("non-existent-fetcher" , "test.pdf" ),
@@ -524,9 +524,9 @@ public void testEmitterNotFound(@TempDir Path tmp) throws Exception {
524524 // Use config with directEmitThresholdBytes=0 to force server-side emission
525525 Path tikaConfigPath = PluginsTestHelper .getFileSystemFetcherConfig ("tika-config-emit-all.json" , tmp , inputDir , tmp .resolve ("output" ), false );
526526 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
527- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
527+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
528528
529- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
529+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
530530 // Use invalid emitter name
531531 FetchEmitTuple tuple = new FetchEmitTuple (testFile ,
532532 new FetchKey (fetcherName , testFile ),
@@ -583,9 +583,9 @@ public void testHeartbeatProtocol(@TempDir Path tmp) throws Exception {
583583 Files .writeString (tikaConfigPath , configContent , StandardCharsets .UTF_8 );
584584
585585 TikaJsonConfig tikaJsonConfig = TikaJsonConfig .load (tikaConfigPath );
586- PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig , tikaConfigPath );
586+ PipesConfig pipesConfig = PipesConfig .load (tikaJsonConfig );
587587
588- try (PipesClient pipesClient = new PipesClient (pipesConfig )) {
588+ try (PipesClient pipesClient = new PipesClient (pipesConfig , tikaConfigPath )) {
589589 // Process file - should complete successfully despite multiple heartbeats
590590 PipesResult pipesResult = pipesClient .process (
591591 new FetchEmitTuple (testFile , new FetchKey (fetcherName , testFile ),
0 commit comments