Skip to content

Commit 4e63a1d

Browse files
committed
BroadleafCommerce#1127 Removed TESTCONTEXTTYPE's behavior of collecting web.xml listed Contexts and updated BaseTest to include them explicitly to fit the new Integration Test design.
1 parent 68ff572 commit 4e63a1d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

common/src/main/java/org/broadleafcommerce/common/extensibility/context/StandardConfigLocations.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private static void addContextFile(int contextType, ArrayList<String> items, Str
8282
((contextType == WEBCONTEXTTYPE || contextType == APPCONTEXTTYPE) && temp.indexOf("-web-") >= 0) ||
8383
((contextType == SERVICECONTEXTTYPE || contextType == TESTCONTEXTTYPE || contextType == APPCONTEXTTYPE) && temp.indexOf("-web-") < 0 && temp.indexOf("-test") < 0 && temp.indexOf("-admin-") < 0) ||
8484
((contextType == SERVICECONTEXTTYPE || contextType == TESTCONTEXTTYPE || contextType == APPCONTEXTTYPE) && temp.indexOf("-admin-applicationContext-persistence") >= 0) ||
85-
(contextType == TESTCONTEXTTYPE && (temp.indexOf("-test") >= 0 || temp.indexOf("-admin-") >= 0 || temp.indexOf("-web-") >= 0))
85+
(contextType == TESTCONTEXTTYPE && (temp.indexOf("-test") >= 0 || temp.indexOf("-web-") >= 0))
8686
){
8787
items.add(temp.trim());
8888
}

integration/src/test/java/org/broadleafcommerce/test/BaseTest.java

+5
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ public static MergeClassPathXMLApplicationContext getContext() {
5858
// After the framework applicationContexts are loaded, we want the module ones
5959
List<String> additionalContexts = new ArrayList<String>(moduleContexts);
6060

61+
// We need the content applicationContexts and admin applicationContexts
62+
additionalContexts.add("bl-open-admin-contentClient-applicationContext.xml");
63+
additionalContexts.add("bl-open-admin-contentCreator-applicationContext.xml");
64+
additionalContexts.add("bl-admin-applicationContext.xml");
65+
6166
// Lastly, we want the test applicationContext
6267
additionalContexts.add("bl-applicationContext-test.xml");
6368

0 commit comments

Comments
 (0)