CLOUDSTACK-9564: Fix NPE due to intermittent test assertion

The test assertion on a pool object may return a null object, as objects
can be randomly expired/tombstoned. This will fix a NPE sometimes seen due
to recently merge for the fix for CLOUDSTACK-9564.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2016-12-05 16:45:33 +05:30
parent 48b28f7d6e
commit dcbf3c8689
1 changed files with 0 additions and 2 deletions

View File

@ -114,7 +114,5 @@ public class VmwareContextPoolTest {
totalRegistrations += client.count();
}
Mockito.verify(vmwareContextPool, Mockito.atLeast(totalRegistrations)).registerContext(Mockito.any(VmwareContext.class));
Assert.assertEquals(vmwareContextPool.composePoolKey(vmwareAddress, vmwareUsername),
vmwareContextPool.getContext(vmwareAddress, vmwareUsername).getPoolKey());
}
}