Change in ovirt-engine[master]: engine: Upgrade to JUnit 4.11

amureini at redhat.com amureini at redhat.com
Mon Jun 2 20:46:53 UTC 2014


Allon Mureinik has submitted this change and it was merged.

Change subject: engine: Upgrade to JUnit 4.11
......................................................................


engine: Upgrade to JUnit 4.11

Upgrades to JUnit 4.11 in order to benefit from its performance
enhancements usability features.

JUnit 4.11 is slightly stricter than JUnit 4.10, so some changes were
required in order to facilitate this change:

1. Removed static modifier from members annotated with the @Rule
   annotation, as this is no longer allowed, or replaced it with
   @ClassRule wherever possible.
   Note that having a static @Rule, even if allowed in earlier
   versions of JUnit is probably a hidden bug just waiting to happen.

2. Replaced usages of JUnitMatchers, which is now deprecated, with the
   standard CoreMatchers.

3. Removed useless calls to both(Matcher) that weren't preceded by
   .and(Mathcer).

4. Removed the usage of the deprected
   org.junit.internal.matchers.TypeSafeMatcher and replaced it with
   org.hamcrest.TypeSafeMatcher (and in any event, importing a class
   with the word "internal" in its package name has a big flashing red
   light all over it).

5. Fixed the matchers' signatures in ValidationResultMatchers to use
   <? super String> instead of <String>.

6. Fixed the wrong usage of is(Integer.class) to
   is(instanceOf(Integer.class) in
   AbstractGwtDynamicHostPageServletTest.

Change-Id: I1ab9c817ac6390bd12c725b5655dbd3fdf6d0c61
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/BackwardCompatibilityTaskCreationTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommonVmPoolWithVmsCommandTestAbstract.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveImageCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/cluster/NetworkClusterValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelperTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/provider/RemoveProviderValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/DiskImagesValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/DiskSnapshotsValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/DiskValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/ValidationResultMatchers.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/VmNicValidatorTest.java
M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/NetworkUtilsTest.java
M backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/vdsbroker/GetDeviceListVDSCommandTest.java
M frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/server/gwt/AbstractGwtDynamicHostPageServletTest.java
M pom.xml
15 files changed, 29 insertions(+), 32 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/27773
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ab9c817ac6390bd12c725b5655dbd3fdf6d0c61
Gerrit-PatchSet: 5
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: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkolesni at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list