Skip to content
Snippets Groups Projects
Commit b44e9121 authored by felmer's avatar felmer
Browse files

BIS-183 tests in SegmentedStoreShufflingTaskTest fixed

SVN: 26596
parent 09efd3d9
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,6 @@ import ch.systemsx.cisd.common.filesystem.IFreeSpaceProvider; ...@@ -43,7 +43,6 @@ import ch.systemsx.cisd.common.filesystem.IFreeSpaceProvider;
import ch.systemsx.cisd.common.logging.BufferedAppender; import ch.systemsx.cisd.common.logging.BufferedAppender;
import ch.systemsx.cisd.common.logging.ISimpleLogger; import ch.systemsx.cisd.common.logging.ISimpleLogger;
import ch.systemsx.cisd.common.logging.LogLevel; import ch.systemsx.cisd.common.logging.LogLevel;
import ch.systemsx.cisd.common.test.RecordingMatcher;
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.utils.DssPropertyParametersUtil; import ch.systemsx.cisd.openbis.dss.generic.shared.utils.DssPropertyParametersUtil;
import ch.systemsx.cisd.openbis.dss.generic.shared.utils.Share; import ch.systemsx.cisd.openbis.dss.generic.shared.utils.Share;
...@@ -164,7 +163,6 @@ public class SegmentedStoreShufflingTaskTest extends AbstractFileSystemTestCase ...@@ -164,7 +163,6 @@ public class SegmentedStoreShufflingTaskTest extends AbstractFileSystemTestCase
FileUtilities.writeToFile(new File(share2, "ds2"), "hello ds2"); FileUtilities.writeToFile(new File(share2, "ds2"), "hello ds2");
prepareAsWithdrawShare(share2); prepareAsWithdrawShare(share2);
balancerTask.setUp("mock-balancer", properties); balancerTask.setUp("mock-balancer", properties);
final RecordingMatcher<String> logMessageRecordingMatcher = new RecordingMatcher<String>();
final Sequence sequence1 = context.sequence("seq1"); final Sequence sequence1 = context.sequence("seq1");
context.checking(new Expectations() context.checking(new Expectations()
{ {
...@@ -197,7 +195,6 @@ public class SegmentedStoreShufflingTaskTest extends AbstractFileSystemTestCase ...@@ -197,7 +195,6 @@ public class SegmentedStoreShufflingTaskTest extends AbstractFileSystemTestCase
will(returnValue(Arrays.asList(ds1b, ds2))); will(returnValue(Arrays.asList(ds1b, ds2)));
inSequence(sequence1); inSequence(sequence1);
one(logger).log(with(LogLevel.WARN), with(logMessageRecordingMatcher));
allowing(logger).log( allowing(logger).log(
with(LogLevel.INFO), with(LogLevel.INFO),
with(Matchers.startsWith("Obtained the list of all " with(Matchers.startsWith("Obtained the list of all "
...@@ -229,8 +226,6 @@ public class SegmentedStoreShufflingTaskTest extends AbstractFileSystemTestCase ...@@ -229,8 +226,6 @@ public class SegmentedStoreShufflingTaskTest extends AbstractFileSystemTestCase
+ "INFO NOTIFY.SegmentedStoreShufflingTask - " + "INFO NOTIFY.SegmentedStoreShufflingTask - "
+ "The following shares were emptied by shuffling: [1]", + "The following shares were emptied by shuffling: [1]",
logRecorder.getLogContent()); logRecorder.getLogContent());
assertEquals("Data set ds1 no longer exists in share 2.", logMessageRecordingMatcher
.recordedObject().toString());
context.assertIsSatisfied(); context.assertIsSatisfied();
} }
...@@ -244,9 +239,6 @@ public class SegmentedStoreShufflingTaskTest extends AbstractFileSystemTestCase ...@@ -244,9 +239,6 @@ public class SegmentedStoreShufflingTaskTest extends AbstractFileSystemTestCase
context.checking(new Expectations() context.checking(new Expectations()
{ {
{ {
exactly(2).of(service).listDataSets();
will(returnValue(Arrays.asList()));
one(logger).log(LogLevel.INFO, "Data Store Shares:"); one(logger).log(LogLevel.INFO, "Data Store Shares:");
allowing(logger).log( allowing(logger).log(
with(LogLevel.INFO), with(LogLevel.INFO),
......
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