Skip to content

Commit

Permalink
fix: one more tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Anisimov committed Nov 26, 2020
1 parent 3dd49c9 commit 51291db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ protected List<RequestHandler> createRequestHandlers()

public void init(Instantiator instantiator) {
this.instantiator = instantiator;

init();
}

@Override
Expand All @@ -118,7 +120,9 @@ public void init() {
.thenReturn(resourceProvider);
Mockito.when(context.getAttribute(Lookup.class.getName()))
.thenReturn(lookup);
getServlet().init(config);
if (getServlet().getServletConfig() == null) {
getServlet().init(config);
}
super.init();
} catch (ServiceException | ServletException e) {
throw new RuntimeException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ protected List<RequestHandler> createRequestHandlers()

public void init(Instantiator instantiator) {
this.instantiator = instantiator;

init();
}

@Override
Expand All @@ -118,7 +120,9 @@ public void init() {
.thenReturn(resourceProvider);
Mockito.when(context.getAttribute(Lookup.class.getName()))
.thenReturn(lookup);
getServlet().init(config);
if (getServlet().getServletConfig() == null) {
getServlet().init(config);
}
super.init();
} catch (ServiceException | ServletException e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit 51291db

Please sign in to comment.