From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: engine: Unique Properties enforcement
......................................................................
engine: Unique Properties enforcement
This patch removes AbstractPropertiesTestBase#testDuplicateKeys() and
instead uses Checkstyle'e UniqueProperties check to perform this
validation.
This approach has several benefits:
- External code, no maintenance needed on our side
- Improved performance, as Checkstyle will only load the file once,
instead of each test reloading it as the current code does
- No need to explicitly state this test for every properties file -
checkstyle will automatically apply it to all files (as eveident,
e.g., from the violation found in
frontend/webadmin/modules/frontend/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties)
Change-Id: I32743f2032b525585b496ff689626c88b4ffb044
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/AbstractPropertiesTestBase.java
D
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/DuplicatePropertyException.java
D
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/NoDuplicateProperties.java
M build-tools-root/checkstyles/src/main/resources/checkstyle.xml
M
frontend/webadmin/modules/frontend/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
5 files changed, 1 insertion(+), 39 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Martin Peřina: Looks good to me, but someone else must approve
Allon Mureinik: Verified; Passed CI tests
Vojtech Szocs: Looks good to me, but someone else must approve
--
To view, visit
https://gerrit.ovirt.org/74444
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I32743f2032b525585b496ff689626c88b4ffb044
Gerrit-PatchSet: 2
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: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>