From 8afd058ee3918351f024f184b2b9da89354952e6 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Mon, 7 Sep 2015 14:26:07 +0000 Subject: [PATCH] SSDM-2458: Testing in test-map.js and test-search.js correct post-registered flag. Post-registration is configured to be not successful. SVN: 34601 --- .../as/webapps/openbis-v3-api-test/html/test/test-map.js | 9 ++++++++- .../webapps/openbis-v3-api-test/html/test/test-search.js | 1 + .../common/datastore_server/etc/service.properties | 7 ++++++- .../common/datastore_server2/etc/service.properties | 9 +++++++-- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-map.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-map.js index 76bfbf00224..8ef41d3bc4a 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-map.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-map.js @@ -97,7 +97,14 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open } var fMap = function(facade, permIds) { - return facade.mapDataSets(permIds, new c.DataSetFetchOptions()); + var result = facade.mapDataSets(permIds, new c.DataSetFetchOptions()); + result.then(function(map) { + permIds.forEach(function(permId) { + var entity = map[permId]; + c.assertEqual(entity.isPostRegistered(), false, "post registered for " + permId); + }); + }); + return result; } testMap(c, fCreate, fMap); diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js index 7e4f7f45fca..00a54337a0e 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js @@ -219,6 +219,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open c.assertEqual(dataSet.getExperiment().getCode(), "TEST-EXPERIMENT-2", "Experiment code"); c.assertEqual(dataSet.getSample().getCode(), "TEST-SAMPLE-2", "Sample code"); c.assertEqual(dataSet.getProperties()["DESCRIPTION"], "403 description", "Property DESCRIPTION"); + c.assertEqual(dataSet.isPostRegistered(), true, "post registered"); var externalData = dataSet.getExternalData(); c.assertEqual(externalData.getShareId(), "1", "Share id"); diff --git a/js-test/servers/common/datastore_server/etc/service.properties b/js-test/servers/common/datastore_server/etc/service.properties index 8ae8d5788c1..9dd6b7b5e00 100644 --- a/js-test/servers/common/datastore_server/etc/service.properties +++ b/js-test/servers/common/datastore_server/etc/service.properties @@ -108,9 +108,14 @@ post-registration.class = ch.systemsx.cisd.etlserver.postregistration.PostRegist post-registration.interval = 30 post-registration.cleanup-tasks-folder = ${root-dir}/post-registration/cleanup-tasks post-registration.last-seen-data-set-file = ${root-dir}/post-registration/last-seen-data-set.txt -post-registration.post-registration-tasks = pathinfo-feeding +post-registration.post-registration-tasks = pathinfo-feeding, notifying post-registration.pathinfo-feeding.class = ch.systemsx.cisd.etlserver.path.PathInfoDatabaseFeedingTask post-registration.pathinfo-feeding.compute-checksum = true +# The NotifyingTask throws an exception. Thus, post-registration will always fail. +# This is needed to have an example of a data set which isn't post-registered. +post-registration.notifying.class = ch.systemsx.cisd.etlserver.postregistration.NotifyingTask +post-registration.notifying.destination-path-template = targets/${unknown-placeholder-preventing-post-registration} +post-registration.notifying.message-template = hello # Maintenance task for deleting entries from pathinfo database after deletion of a data set path-info-deletion.class = ch.systemsx.cisd.etlserver.plugins.DeleteFromExternalDBMaintenanceTask diff --git a/js-test/servers/common/datastore_server2/etc/service.properties b/js-test/servers/common/datastore_server2/etc/service.properties index 8b8fe533d37..846a170bb82 100644 --- a/js-test/servers/common/datastore_server2/etc/service.properties +++ b/js-test/servers/common/datastore_server2/etc/service.properties @@ -103,14 +103,19 @@ path-info-db.scriptFolder = ../../../../datastore_server/source/sql # Comma separated names of maintenance plugins. Each plugin should have configuration properties prefixed with its name. maintenance-plugins = post-registration, path-info-deletion -# Maintenance task for post registration of all paths of a freshly registered data set to be fed into pathinfo database +# Maintenance task for post registration of all paths of a freshly registered data set to be fed into pathinfo database post-registration.class = ch.systemsx.cisd.etlserver.postregistration.PostRegistrationMaintenanceTask post-registration.interval = 30 post-registration.cleanup-tasks-folder = ${root-dir}/post-registration/cleanup-tasks post-registration.last-seen-data-set-file = ${root-dir}/post-registration/last-seen-data-set.txt -post-registration.post-registration-tasks = pathinfo-feeding +post-registration.post-registration-tasks = pathinfo-feeding, notifying post-registration.pathinfo-feeding.class = ch.systemsx.cisd.etlserver.path.PathInfoDatabaseFeedingTask post-registration.pathinfo-feeding.compute-checksum = true +# The NotifyingTask throws an exception. Thus, post-registration will always fail. +# This is needed to have an example of a data set which isn't post-registered. +post-registration.notifying.class = ch.systemsx.cisd.etlserver.postregistration.NotifyingTask +post-registration.notifying.destination-path-template = targets/${unknown-placeholder-preventing-post-registration} +post-registration.notifying.message-template = hello # Maintenance task for deleting entries from pathinfo database after deletion of a data set path-info-deletion.class = ch.systemsx.cisd.etlserver.plugins.DeleteFromExternalDBMaintenanceTask -- GitLab