Yair Zaslavsky has uploaded a new change for review.

Change subject: core: Fixing job dao test
......................................................................

core: Fixing job dao test

Job dao test relies that the first job
is always the same - this assumption may
cause a test to fail

Change-Id: Iaebd1263c3a046dd8908af1258016b17dc198a20
Signed-off-by: Yair Zaslavsky <[email protected]>
---
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/JobDaoTest.java
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/31/19131/1

diff --git 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/JobDaoTest.java
 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/JobDaoTest.java
index 65366c6..0e1e2d8 100644
--- 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/JobDaoTest.java
+++ 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/JobDaoTest.java
@@ -106,12 +106,10 @@
     public void updateJobLastUpdateTime() throws ParseException {
         DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Date updateDate = df.parse("2012-10-01 10:00:00");
-        List<Job> jobsList = dao.getAll();
-        assertTrue("Check there are Job entries", !jobsList.isEmpty());
-        Job job = jobsList.get(0);
+        Job job = dao.get(getExistingEntityId());
         Date lastUpdateTime = job.getLastUpdateTime();
         dao.updateJobLastUpdateTime(getExistingEntityId(), updateDate);
-        Job jobAfterUpdate = dao.get(job.getId());
+        Job jobAfterUpdate = dao.get(getExistingEntityId());
         assertTrue("Compare the previous date is differ than new one",
                 !lastUpdateTime.equals(jobAfterUpdate.getLastUpdateTime()));
         assertEquals("Compare date was persisted by reading it from database",


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaebd1263c3a046dd8908af1258016b17dc198a20
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to