Skip to content

Commit b698a6d

Browse files
committed
Add helper method getProgrammaticRootContextWithManager() in TomcatBaseTest
1 parent 19e24f4 commit b698a6d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/org/apache/catalina/startup/TomcatBaseTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,13 @@ public Context getProgrammaticRootContext() {
148148
((StandardJarScanner) ctx.getJarScanner()).setScanClassPath(false);
149149
return ctx;
150150
}
151-
152-
151+
public Context getProgrammaticRootContextWithManager() {
152+
Context ctx = getProgrammaticRootContext();
153+
if (ctx.getManager() == null) {
154+
ctx.setManager(new StandardManager());
155+
}
156+
return ctx;
157+
}
153158
/*
154159
* Sub-classes need to know port so they can connect
155160
*/

0 commit comments

Comments
 (0)