From 57e5d1d237d2619d30dc9aaebe24fa0783c7ec98 Mon Sep 17 00:00:00 2001 From: Roy Wetherall Date: Tue, 12 Apr 2016 09:21:45 -0400 Subject: [PATCH] RM-3114 - review comments --- .../admin/RecordsManagementAdminServiceImpl.java | 4 ++-- .../test/integration/issue/rm3314/RM3314Test.java | 11 ++++++++++- rm-server/test/resources/test-context.xml | 4 ++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java index 66e1f803a0..cc3f7d043b 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java @@ -247,8 +247,8 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin } /** - * Indicate that this application content listener must be executed with the highest - * precedence. + * Indicate that this application content listener must be executed with the lowest + * precedence. (ie last) * * @see Ordered#getOrder() */ diff --git a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/issue/rm3314/RM3314Test.java b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/issue/rm3314/RM3314Test.java index 89911e5fab..7bc0a982bf 100644 --- a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/issue/rm3314/RM3314Test.java +++ b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/issue/rm3314/RM3314Test.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2014 Alfresco Software Limited. + * Copyright (C) 2005-2016 Alfresco Software Limited. * * This file is part of Alfresco * @@ -32,6 +32,7 @@ import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase; */ public class RM3314Test extends BaseRMTestCase { + /** registry to record callback from test beans "test.rm3114.1" and "test.rm3114.2" */ public static Map callback = new HashMap(2); /** @@ -45,6 +46,14 @@ public class RM3314Test extends BaseRMTestCase */ public void testListenersExecutedInTheCorrectOrder() { + /** + * The related test beans will call back into the callback map showing + * whether at the end of their execution whether the custom model has been + * initialised or not. Given the order in which these test beans are executed + * on spring context load, we would expect that .1 executes with the custom + * map unloaded, and the .2 with it loaded. + */ + assertFalse(callback.isEmpty()); assertFalse(callback.get("test.rm3314.1")); assertTrue(callback.get("test.rm3314.2")); diff --git a/rm-server/test/resources/test-context.xml b/rm-server/test/resources/test-context.xml index d0f608937c..6112260cb4 100644 --- a/rm-server/test/resources/test-context.xml +++ b/rm-server/test/resources/test-context.xml @@ -242,6 +242,8 @@ + @@ -250,6 +252,8 @@ +