1616import org .irods .jargon .core .exception .JargonException ;
1717import org .irods .jargon .core .pub .DataTransferOperations ;
1818import org .irods .jargon .core .pub .IRODSFileSystem ;
19+ import org .irods .jargon .core .pub .io .IRODSFile ;
1920import org .irods .jargon .core .transfer .TransferControlBlock ;
2021import org .irods .jargon .testutils .IRODSTestAssertionException ;
2122import org .irods .jargon .testutils .TestingPropertiesHelper ;
@@ -264,9 +265,16 @@ public void testParallelTransferSetNoNegotiationBug228()
264265 return ;
265266 }
266267
268+ /*
269+ * Only run if pam enabled
270+ */
271+ if (!testingPropertiesHelper .isTestPAM (testingProperties )) {
272+ return ;
273+ }
274+
267275 IRODSAccount irodsAccount = testingPropertiesHelper
268- .buildIRODSAccountFromTestProperties (testingProperties );
269- irodsAccount .setAuthenticationScheme (AuthScheme .STANDARD );
276+ .buildPamIrodsAccountFromTestProperties (testingProperties );
277+ irodsAccount .setAuthenticationScheme (AuthScheme .PAM );
270278
271279 SettableJargonProperties settableJargonProperties = new SettableJargonProperties (
272280 irodsFileSystem .getJargonProperties ());
@@ -286,9 +294,16 @@ public void testParallelTransferSetNoNegotiationBug228()
286294 length );
287295
288296 String targetIrodsPath = testingPropertiesHelper
289- .buildIRODSCollectionAbsolutePathFromTestProperties (
297+ .buildIRODSCollectionAbsolutePathFromPamTestProperties (
290298 testingProperties , IRODS_TEST_SUBDIR_PATH + '/'
291299 + testFileName );
300+
301+ IRODSFile collFile = irodsFileSystem .getIRODSAccessObjectFactory ()
302+ .getIRODSFileFactory (irodsAccount )
303+ .instanceIRODSFile (targetIrodsPath );
304+ IRODSFile parentFile = (IRODSFile ) collFile .getParentFile ();
305+ parentFile .delete ();
306+ parentFile .mkdirs ();
292307 DataTransferOperations dataTransferOperationsAO = irodsFileSystem
293308 .getIRODSAccessObjectFactory ().getDataTransferOperations (
294309 irodsAccount );
@@ -297,9 +312,14 @@ public void testParallelTransferSetNoNegotiationBug228()
297312 "" , null , null );
298313
299314 File getFile = new File (absPath , returnedTestFileName );
315+ File getFileParent = getFile .getParentFile ();
316+ getFileParent .delete ();
317+ getFileParent .mkdirs ();
300318 dataTransferOperationsAO .getOperation (targetIrodsPath ,
301319 getFile .getAbsolutePath (), "" , null , null );
302320
321+ // checksum verification is in place, so no error = success
322+
303323 }
304324
305325 @ Test
0 commit comments