Change in ovirt-engine[master]: core: ActionGroupDAOTest#testRemoveActionVersionMap

amureini at redhat.com amureini at redhat.com
Sat May 17 07:26:41 UTC 2014


Allon Mureinik has submitted this change and it was merged.

Change subject: core: ActionGroupDAOTest#testRemoveActionVersionMap
......................................................................


core: ActionGroupDAOTest#testRemoveActionVersionMap

The current implementation of this test removes existingActionMap from
the database. Since there is no rollback performed between tests, and
since other tests in this class assume this object will be present in
the database, this implementation caused sporadic failures on various
environments [1], depending on the order the tests were executed.

This patch rewrites the test to be safer. It now creates a dummy record
in the table, inserts it (and asserts it was indeed inserted), and then
removes it (again, asserting it was properly removed).

[1] Details of the system where a failure was spotted:
Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
Maven home: /usr/local/apache-maven-3.0.4
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.11.2.el6.x86_64", arch: "amd64", family: "unix"

Change-Id: Icba824009bec7763c38b3040eb9b1be88558f037
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/ActionGroupDAOTest.java
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Allon Mureinik: Verified
  Oved Ourfali: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icba824009bec7763c38b3040eb9b1be88558f037
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: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list