From 23d4d3cbec31f2a6b89e23088d88abe496f07b36 Mon Sep 17 00:00:00 2001 From: pkupczyk <pkupczyk> Date: Fri, 24 Feb 2012 09:08:56 +0000 Subject: [PATCH] LMS-2793 - Create a faster version of GeneralInformationService.getDataSetMetaData() method with an additional fetchOptions parameter - JUNIT fix SVN: 24566 --- .../bo/datasetlister/DatasetListerTest.java | 6 +++--- .../api/v1/GeneralInformationServiceTest.java | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerTest.java index d55e4f99cff..c9b30f03303 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerTest.java @@ -219,7 +219,7 @@ public class DatasetListerTest extends AbstractDAOTest assertEquals("20081105092259900-0", dataSets.get(0).getCode()); assertEquals("STANDARD", dataSets.get(0).getDataStore().getCode()); assertEquals(0, dataSets.get(0).getProperties().size()); - assertEquals(8, dataSets.size()); + assertEquals(11, dataSets.size()); } @Test @@ -322,7 +322,7 @@ public class DatasetListerTest extends AbstractDAOTest assertEquals("42", ((DataSet) dataSet).getShareId()); assertEquals(4711L, ((DataSet) dataSet).getSize().longValue()); assertEquals(DataSetArchivingStatus.AVAILABLE, ((DataSet) dataSet).getStatus()); - assertEquals(14, list.size()); + assertEquals(17, list.size()); } @Test @@ -344,7 +344,7 @@ public class DatasetListerTest extends AbstractDAOTest DataSetShareId dataSet2 = list.get(1); assertEquals("20081105092159111-1", dataSet2.getDataSetCode()); assertEquals("42", dataSet2.getShareId()); - assertEquals(15, list.size()); + assertEquals(18, list.size()); } private void assertSameDataSetsForSameCode(Map<String, ExternalData> dataSetsByCode, diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java index 49fb28152d5..0bf97c6501a 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java @@ -314,17 +314,19 @@ public class GeneralInformationServiceTest extends SystemTestCase generalInformationService.listDataSetsForExperiments(sessionToken, Arrays.asList(new Experiment(e1)), EnumSet.allOf(Connections.class)); - assertDataSets("[20081105092259000-18, 20081105092259000-8, 20081105092259000-9, " - + "20081105092259900-0, 20081105092259900-1, 20081105092359990-2, " - + "20110509092359990-10, 20110509092359990-11, 20110509092359990-12]", dataSets); - List<String> parentCodes = new ArrayList<String>(dataSets.get(2).getParentCodes()); + assertDataSets( + "[20081105092259000-18, 20081105092259000-19, 20081105092259000-20, 20081105092259000-21, 20081105092259000-8, 20081105092259000-9, " + + "20081105092259900-0, 20081105092259900-1, 20081105092359990-2, " + + "20110509092359990-10, 20110509092359990-11, 20110509092359990-12]", + dataSets); + List<String> parentCodes = new ArrayList<String>(dataSets.get(5).getParentCodes()); Collections.sort(parentCodes); assertEquals("[20081105092159111-1, 20081105092159222-2, 20081105092159333-3]", parentCodes.toString()); - List<String> childrenCodes = new ArrayList<String>(dataSets.get(2).getChildrenCodes()); + List<String> childrenCodes = new ArrayList<String>(dataSets.get(5).getChildrenCodes()); Collections.sort(childrenCodes); assertEquals("[]", childrenCodes.toString()); - DataSet dataSet = dataSets.get(6); + DataSet dataSet = dataSets.get(9); assertEquals(true, dataSet.isContainerDataSet()); assertEquals("[DataSet[20110509092359990-11,/CISD/DEFAULT/EXP-REUSE,<null>,HCS_IMAGE," + "{COMMENT=non-virtual comment},[]], " -- GitLab