Prevents 2x stop() calls during IntegrationTest

It seems that NoteDB does not manage gracefully the double
invocations of the GerritServer.stop and throws a NPE.

However, that is really a corner case that never happens in
real life; setting the server instance to null prevents
multiple close() invocations on the same server object.

Change-Id: I34da521830ca4caa935c2968c567cc5f4daca44d
This commit is contained in:
Luca Milanesio 2017-04-05 07:37:48 +01:00
parent 850facf11b
commit 0bee4f97ce
1 changed files with 1 additions and 0 deletions

View File

@ -514,6 +514,7 @@ public abstract class AbstractDaemonTest {
}
if (server != commonServer) {
server.stop();
server = null;
}
}