Change in ovirt-engine[master]: core: Proper mocking for Spy()ed command
amureini at redhat.com
amureini at redhat.com
Wed Jun 24 16:28:36 UTC 2015
Allon Mureinik has submitted this change and it was merged.
Change subject: core: Proper mocking for Spy()ed command
......................................................................
core: Proper mocking for Spy()ed command
A Spy()ed object's mocking should be done with the
doSomething().when(object).someMethod() syntax instead of the
when(objet.someMethod).thenDoSoemthing() syntax in order to prevent the
real object from being executed.
This patch fixes the mocking of the spied
AddExistingBlockStorageDomainCommand instance in the test. This
behavior, apart from being theoretically correct, was observed to remove
a warning logged to stderr. Although the specifics of the timestamp and
UUID could obviously change, the general form of the error was:
"""
2015-06-24 18:48:55,813 SEVERE
[org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand
getLUNsFromVgInfo] Could not get info for VG ID
'ba0d7cea-173f-4b9a-ba29-128891ba9056': null
"""
This error may be related to recent failures observed in the CI
environment (see, e.g.,
http://jenkins.ovirt.org/job/ovirt-engine_master_create-rpms_merged/label=el7/3641/console),
although this is unconfirmed at this time.
Change-Id: Id89c834c557e0955bd064c7938a0a2966eed380d
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/AddExistingBlockStorageDomainCommandTest.java
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/42829
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id89c834c557e0955bd064c7938a0a2966eed380d
Gerrit-PatchSet: 3
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: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
More information about the Engine-commits
mailing list