Allon Mureinik has submitted this change and it was merged. Change subject: core: Clean up query test conf mocking ......................................................................
core: Clean up query test conf mocking Previously, AbstractQueryTest defined a @ClassRule for mocking Config values. Since @ClassRules are hidden, not inherited, if any descending class wished to have it's own MockConfigRule, the mocking from the base class had to be copied to the descending class in order not to lose it. This approach is both error prone and conceptually lacking, as it forces the descendant classes to know details about the parent's implementation. This patch attempts to improve the situation by have AbstractQueryTest define the getExtraConfigDescriptors() method. This allows each inheriting class to specify which Config values it wishes to add to the mocking, while leaving the actual mocking to the base class. Change-Id: I1d511b1f67e842a64b7c9322a0d526e717f4a601 Signed-off-by: Allon Mureinik <amure...@redhat.com> --- M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AbstractQueryTest.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AbstractSysprepQueryTest.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GetAddedGlusterServersQueryTest.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/GetDeviceListQueryTest.java M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/MockConfigRule.java 5 files changed, 30 insertions(+), 19 deletions(-) Approvals: Tal Nisan: Looks good to me, approved Allon Mureinik: Verified Idan Shaby: Looks good to me, but someone else must approve Yair Zaslavsky: Looks good to me, approved Oved Ourfali: Looks good to me, but someone else must approve -- To view, visit http://gerrit.ovirt.org/36539 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d511b1f67e842a64b7c9322a0d526e717f4a601 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Idan Shaby <ish...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches