Skip to content
Snippets Groups Projects
Commit 24d176d8 authored by buczekp's avatar buczekp
Browse files

[LMS-2363] fixed DSS tests

SVN: 22065
parent 22ce5772
No related branches found
No related tags found
No related merge requests found
...@@ -33,9 +33,9 @@ import ch.systemsx.cisd.common.mail.From; ...@@ -33,9 +33,9 @@ import ch.systemsx.cisd.common.mail.From;
import ch.systemsx.cisd.common.mail.IMailClient; import ch.systemsx.cisd.common.mail.IMailClient;
import ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService; import ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService;
import ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetInformation; import ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetInformation;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Deletion;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Deletion;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Person; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Person;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Project; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Project;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample;
...@@ -261,7 +261,7 @@ public final class DataStrategyStoreTest extends AbstractFileSystemTestCase ...@@ -261,7 +261,7 @@ public final class DataStrategyStoreTest extends AbstractFileSystemTestCase
final String logContent = logRecorder.getLogContent(); final String logContent = logRecorder.getLogContent();
assertEquals("ERROR NOTIFY.DataStrategyStore - " assertEquals("ERROR NOTIFY.DataStrategyStore - "
+ "Data set for sample 'MY-INSTANCE:/S' can not be registered " + "Data set for sample 'MY-INSTANCE:/S' can not be registered "
+ "because experiment 'E' has been invalidated.", logContent); + "because experiment 'E' has been deleted.", logContent);
context.assertIsSatisfied(); context.assertIsSatisfied();
} }
......
...@@ -87,7 +87,8 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifi ...@@ -87,7 +87,8 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifi
public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestCase public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestCase
{ {
private static final String SHARE_ID = ch.systemsx.cisd.openbis.dss.generic.shared.Constants.DEFAULT_SHARE_ID; private static final String SHARE_ID =
ch.systemsx.cisd.openbis.dss.generic.shared.Constants.DEFAULT_SHARE_ID;
private static final String SAMPLE_CODE = "sample1"; private static final String SAMPLE_CODE = "sample1";
...@@ -284,7 +285,8 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC ...@@ -284,7 +285,8 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC
new ThreadParameters(threadProperties, "pre-registration-script-test"); new ThreadParameters(threadProperties, "pre-registration-script-test");
TopLevelDataSetRegistratorGlobalState globalState = TopLevelDataSetRegistratorGlobalState globalState =
new TopLevelDataSetRegistratorGlobalState("dss", ch.systemsx.cisd.openbis.dss.generic.shared.Constants.DEFAULT_SHARE_ID, new TopLevelDataSetRegistratorGlobalState("dss",
ch.systemsx.cisd.openbis.dss.generic.shared.Constants.DEFAULT_SHARE_ID,
workingDirectory, authorizedLimsService, mailClient, dataSetValidator, workingDirectory, authorizedLimsService, mailClient, dataSetValidator,
null, true, threadParameters); null, true, threadParameters);
...@@ -365,7 +367,8 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC ...@@ -365,7 +367,8 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC
private String getRelativeTargetFolder() private String getRelativeTargetFolder()
{ {
String absoluteTarget = targetFolder.getAbsolutePath(); String absoluteTarget = targetFolder.getAbsolutePath();
return absoluteTarget.substring(workingDirectory.getAbsolutePath().length() + 1 + SHARE_ID.length() + 1); return absoluteTarget.substring(workingDirectory.getAbsolutePath().length() + 1
+ SHARE_ID.length() + 1);
} }
// crates sample connected to an experiment // crates sample connected to an experiment
...@@ -551,7 +554,7 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC ...@@ -551,7 +554,7 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC
final File finalDataSetPath = new File(baseDir, DATA1_NAME); final File finalDataSetPath = new File(baseDir, DATA1_NAME);
will(returnValue(finalDataSetPath)); will(returnValue(finalDataSetPath));
one(transaction).commit(); one(transaction).commit();
one(shareIdManager).setShareId(DATA_SET_CODE, "1"); one(shareIdManager).setShareId(DATA_SET_CODE, "1");
} }
}); });
...@@ -599,7 +602,7 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC ...@@ -599,7 +602,7 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC
final File finalDataSetPath = new File(baseDir, DATA1_NAME); final File finalDataSetPath = new File(baseDir, DATA1_NAME);
will(returnValue(finalDataSetPath)); will(returnValue(finalDataSetPath));
one(transaction).commit(); one(transaction).commit();
one(shareIdManager).setShareId(DATA_SET_CODE, "1"); one(shareIdManager).setShareId(DATA_SET_CODE, "1");
} }
}); });
...@@ -648,7 +651,7 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC ...@@ -648,7 +651,7 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC
+ SAMPLE_CODE + SAMPLE_CODE
+ "', " + "', "
+ "but according to the openBIS server there is no such sample for this experiment " + "but according to the openBIS server there is no such sample for this experiment "
+ "(it has maybe been invalidated?). We thus consider it invalid." + "(maybe it has been deleted?). We thus consider it invalid."
+ OSUtilities.LINE_SEPARATOR + "INFO OPERATION.FileRenamer - " + OSUtilities.LINE_SEPARATOR + "INFO OPERATION.FileRenamer - "
+ "Moving file 'data1' from '<wd>' to '<wd>/1/invalid/DataSetType_O1'."); + "Moving file 'data1' from '<wd>' to '<wd>/1/invalid/DataSetType_O1'.");
...@@ -801,7 +804,8 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC ...@@ -801,7 +804,8 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC
new ThreadParameters(threadProperties, "pre-registration-script-test"); new ThreadParameters(threadProperties, "pre-registration-script-test");
TopLevelDataSetRegistratorGlobalState globalState = TopLevelDataSetRegistratorGlobalState globalState =
new TopLevelDataSetRegistratorGlobalState("dss", ch.systemsx.cisd.openbis.dss.generic.shared.Constants.DEFAULT_SHARE_ID, new TopLevelDataSetRegistratorGlobalState("dss",
ch.systemsx.cisd.openbis.dss.generic.shared.Constants.DEFAULT_SHARE_ID,
workingDirectory, authorizedLimsService, mailClient, dataSetValidator, workingDirectory, authorizedLimsService, mailClient, dataSetValidator,
null, true, threadParameters); null, true, threadParameters);
context.checking(new Expectations() context.checking(new Expectations()
...@@ -839,7 +843,7 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC ...@@ -839,7 +843,7 @@ public final class TransferredDataSetHandlerTest extends AbstractFileSystemTestC
final File finalDataSetPath = new File(baseDir, DATA1_NAME); final File finalDataSetPath = new File(baseDir, DATA1_NAME);
will(returnValue(finalDataSetPath)); will(returnValue(finalDataSetPath));
one(transaction).commit(); one(transaction).commit();
one(shareIdManager).setShareId(DATA_SET_CODE, "1"); one(shareIdManager).setShareId(DATA_SET_CODE, "1");
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment