Change in ovirt-engine[master]: core: testDetermineTotalImageInitialSizeFromNfsToCow NPE

Code Review gerrit at ovirt.org
Sun May 14 10:08:20 UTC 2017


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: core: testDetermineTotalImageInitialSizeFromNfsToCow NPE
......................................................................


core: testDetermineTotalImageInitialSizeFromNfsToCow NPE

Commit 541c6a introduced ImagesHandler#determineTotalImageInitialSize
and its test,
ImagesHandlerTest#testDetermineTotalImageInitialSizeFromNfsToCow.

determineTotalImageInitialSize could in theory return null, so if a
bug is introduced there, the test may error out with an NPE instead
"cleanly" failing.
Comparing java.lang.Longs instead of primitive longs in the test
solves this issue.

This patch solves Coverity CID 1375001.

Change-Id: I8b644c3dd79ea62cda668ff7ed7e74e78a90abc3
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/image/ImagesHandlerTest.java
1 file changed, 2 insertions(+), 5 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified
  Freddy Rolland: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/76769
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b644c3dd79ea62cda668ff7ed7e74e78a90abc3
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list