mirror of https://github.com/apache/jclouds.git
Fixes potentially deleting a null server id.
This commit is contained in:
parent
22a8b9d04c
commit
7588d2fba4
|
@ -88,7 +88,9 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
|
|||
Server server = serverApi.get(serverId);
|
||||
assertEquals(server.getStatus(), Server.Status.ACTIVE);
|
||||
} finally {
|
||||
serverApi.delete(serverId);
|
||||
if (serverId!=null) {
|
||||
serverApi.delete(serverId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +135,9 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
|
|||
Server server = serverApi.get(serverId);
|
||||
assertEquals(server.getStatus(), Server.Status.ERROR);
|
||||
} finally {
|
||||
serverApi.delete(serverId);
|
||||
if (serverId!=null) {
|
||||
serverApi.delete(serverId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +172,9 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
|
|||
assertEquals("fe80::100", rebuiltServer.getAccessIPv6());
|
||||
|
||||
} finally {
|
||||
serverApi.delete(serverId);
|
||||
if (serverId!=null) {
|
||||
serverApi.delete(serverId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue