From bbd1e101a22c058374ec72c8d5bd85d9d3ebe82a Mon Sep 17 00:00:00 2001 From: kaloyane <kaloyane> Date: Tue, 5 Jul 2011 14:54:53 +0000 Subject: [PATCH] minor: changes related to the sanofi test SVN: 21999 --- .../AbstractJythonDataSetHandlerTest.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/AbstractJythonDataSetHandlerTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/AbstractJythonDataSetHandlerTest.java index 926c0f0ffd7..99bd9f93553 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/AbstractJythonDataSetHandlerTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/AbstractJythonDataSetHandlerTest.java @@ -70,7 +70,7 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste private static final String DATABASE_INSTANCE_UUID = "db-uuid"; - protected JythonTopLevelDataSetHandler<DataSetInformation> handler; + protected JythonTopLevelDataSetHandler<? extends DataSetInformation> handler; protected Mockery context; @@ -172,10 +172,10 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste handler = new TestingDataSetHandler(globalState, registrationShouldFail, - shouldReThrowException); + shouldReThrowException); } - private TopLevelDataSetRegistratorGlobalState createGlobalState(Properties threadProperties) + protected TopLevelDataSetRegistratorGlobalState createGlobalState(Properties threadProperties) { ThreadParameters threadParameters = new ThreadParameters(threadProperties, "jython-handler-test"); @@ -253,14 +253,20 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste public void storeData(DataSetInformation dataSetInformation, ITypeExtractor typeExtractor, IMailClient mailClient, - File incomingDataSetDirectory, File rootDir) + File incomingDataSetFile, File rootDir) { - incomingDirs.add(incomingDataSetDirectory); + incomingDirs.add(incomingDataSetFile); rootDirs.add(rootDir); dataSetInfoString = dataSetInformation.toString(); try { - FileUtils.copyDirectory(incomingDataSetDirectory, rootDir); + if (incomingDataSetFile.isDirectory()) + { + FileUtils.copyDirectory(incomingDataSetFile, rootDir); + } else + { + FileUtils.copyFileToDirectory(incomingDataSetFile, rootDir); + } } catch (IOException ex) { throw new IOExceptionUnchecked(ex); -- GitLab