Skip to content

Commit

Permalink
Merge pull request apache#1816 from shapeblue/4.9-fix-npe-vmware
Browse files Browse the repository at this point in the history
CLOUDSTACK-9564: Fix NPE due to intermittent test assertionThe 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.

(we can merge this if Travis passes)

/cc @abhinandanprateek @murali-reddy

* pr/1816:
  CLOUDSTACK-9564: Fix NPE due to intermittent test assertion

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
  • Loading branch information
rohityadavcloud committed Dec 6, 2016
2 parents 48b28f7 + dcbf3c8 commit 8d506a6
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,5 @@ public void testMultithreadedPoolClients() throws Exception {
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());
}
}

0 comments on commit 8d506a6

Please sign in to comment.