AbstractQueryChangesTest: avoid possible NPEs on teardown
Change-Id: I517c77fca3a3a40767137296dc55d129855af809
This commit is contained in:
@@ -118,9 +118,13 @@ public abstract class AbstractQueryChangesTest {
|
|||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDownInjector() {
|
public void tearDownInjector() {
|
||||||
|
if (lifecycle != null) {
|
||||||
lifecycle.stop();
|
lifecycle.stop();
|
||||||
|
}
|
||||||
requestContext.setContext(null);
|
requestContext.setContext(null);
|
||||||
|
if (db != null) {
|
||||||
db.close();
|
db.close();
|
||||||
|
}
|
||||||
InMemoryDatabase.drop(schemaFactory);
|
InMemoryDatabase.drop(schemaFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user