From 41019dc9323786f5c348318f46ce85ede851b302 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Mon, 11 Jan 2016 06:45:47 +0000
Subject: [PATCH] SSDM-2718: Enable new core plugin again.

SVN: 35450
---
 .../spring/ExposablePropertyPlaceholderConfigurer.java |  5 +++++
 ...ePluginsInjectingPropertyPlaceholderConfigurer.java |  4 +---
 .../openbis/systemtest/asapi/v3/SearchServiceTest.java | 10 ++++++----
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/common/source/java/ch/systemsx/cisd/common/spring/ExposablePropertyPlaceholderConfigurer.java b/common/source/java/ch/systemsx/cisd/common/spring/ExposablePropertyPlaceholderConfigurer.java
index 36b25f0b72c..0eac3874357 100644
--- a/common/source/java/ch/systemsx/cisd/common/spring/ExposablePropertyPlaceholderConfigurer.java
+++ b/common/source/java/ch/systemsx/cisd/common/spring/ExposablePropertyPlaceholderConfigurer.java
@@ -84,6 +84,11 @@ public class ExposablePropertyPlaceholderConfigurer extends PropertyPlaceholderC
             final String keyStr = key.toString();
             resolvedProps.setProperty(keyStr, getResolvedProperty(props, keyStr));
         }
+        injectPropertiesInto(resolvedProps);
+    }
+    
+    protected void injectPropertiesInto(Properties properties)
+    {
     }
 
     @SuppressWarnings("deprecation")
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginsInjectingPropertyPlaceholderConfigurer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginsInjectingPropertyPlaceholderConfigurer.java
index ba56c8cf567..53b168c0fd4 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginsInjectingPropertyPlaceholderConfigurer.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginsInjectingPropertyPlaceholderConfigurer.java
@@ -16,7 +16,6 @@
 
 package ch.systemsx.cisd.openbis.generic.server.coreplugin;
 
-import java.io.IOException;
 import java.util.Properties;
 
 import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.ServiceProvider;
@@ -44,9 +43,8 @@ public class CorePluginsInjectingPropertyPlaceholderConfigurer extends
             BasicConstant.WEB_APPS_PROPERTY);
 
     @Override
-    protected void loadProperties(Properties properties) throws IOException
+    protected void injectPropertiesInto(Properties properties)
     {
-        super.loadProperties(properties);
         CorePluginsUtils.addCorePluginsProperties(properties, ScannerType.AS);
         PluginType dssDataSources = createPluginTypeDssDataSources();
         PluginType maintenanceTasks =
diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/SearchServiceTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/SearchServiceTest.java
index 48403a4848b..c3a5ce62438 100644
--- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/SearchServiceTest.java
+++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/SearchServiceTest.java
@@ -31,17 +31,19 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.service.search.ServiceSearchCrit
 public class SearchServiceTest extends AbstractTest
 {
 
-    @Test(enabled = false)
+    @Test
     public void testSearchServices()
     {
         String sessionToken = v3api.login(TEST_USER, PASSWORD);
+        ServiceSearchCriteria searchCriteria = new ServiceSearchCriteria();
+        searchCriteria.withCode().thatEquals("simple-service");
 
-        SearchResult<Service> result = v3api.searchServices(sessionToken, new ServiceSearchCriteria(), new ServiceFetchOptions());
+        SearchResult<Service> result = v3api.searchServices(sessionToken, searchCriteria, new ServiceFetchOptions());
 
         assertEquals(result.getTotalCount(), 1);
     }
     
-    @Test(enabled = false)
+    @Test
     public void testSearchAllServicesSortedPage2()
     {
         ServiceFetchOptions fetchOptions = new ServiceFetchOptions();
@@ -53,7 +55,7 @@ public class SearchServiceTest extends AbstractTest
         assertEquals(result.getTotalCount(), 4);
     }
     
-    @Test(enabled = false)
+    @Test
     public void testSearchServiceByCode()
     {
         String sessionToken = v3api.login(TEST_USER, PASSWORD);
-- 
GitLab