Michael Kublin has submitted this change and it was merged.
Change subject: core: UnPowerMock GetUserVmsByUserIdAndGroupsQueryTest
......................................................................
core: UnPowerMock GetUserVmsByUserIdAndGroupsQueryTest
Removed PowerMock depedency from GetUserVmsByUserIdAndGroupsQueryTest,
and replaced it by spying the query's protected methods.
In order to achieve this improvement, some refactoring was required in
GetUserVmsByUserIdAndGroupsQuery and in
GetUserVmsByUserIdAndGroupsQueryTest. First, some protected metods were
extracted to prevent executeQuery() to call VmHandler and ImagesHandler
directly. Second, the test itslef was slightly simplified so it would
actually test the query's flow and not the underlying handlers'
implementations - which is not appropriate in a UNIT test.
Change-Id: I82f99e6deeb0df9b44bfdbfc41f5da675af858e8
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUserVmsByUserIdAndGroupsQuery.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/GetUserVmsByUserIdAndGroupsQueryTest.java
2 files changed, 22 insertions(+), 26 deletions(-)
Approvals:
Michael Kublin: Looks good to me, approved
Allon Mureinik: Verified; Looks good to me, but someone else must approve
--
To view, visit
http://gerrit.ovirt.org/4933
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I82f99e6deeb0df9b44bfdbfc41f5da675af858e8
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin(a)redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkolesni(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>