Skip to content

Commit

Permalink
AbstractModelIntegrationTest: fix of NPE on dummyAuditService
Browse files Browse the repository at this point in the history
DummyAuditService is not a managed component, so we can safely init
it in constructor and then we don't have to check its nullity.
NPE happened in TestLoggingConfiguration test that (for good reasons)
didn't call super.initSystem().
  • Loading branch information
virgo47 committed Mar 1, 2020
1 parent a35d707 commit f7a83ac
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -203,15 +203,14 @@ public abstract class AbstractModelIntegrationTest extends AbstractIntegrationTe
protected boolean verbose = false;

public AbstractModelIntegrationTest() {
super();
dummyAuditService = DummyAuditService.getInstance();
}

@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
logger.trace("initSystem");
dummyResourceCollection = new DummyResourceCollection(modelService);
startResources();
dummyAuditService = DummyAuditService.getInstance();
InternalsConfig.reset();
InternalsConfig.setAvoidLoggingChange(isAvoidLoggingChange());
// Make sure the checks are turned on
Expand Down

0 comments on commit f7a83ac

Please sign in to comment.