[Engine-devel] Removing class TimeLeaseVmPoolMapDAOHibernate

Jaroslav Henner jhenner at redhat.com
Tue Jan 3 13:10:49 UTC 2012


Hi.

I'm a automation tester in RHEVM QE team. We want to raise code coverage 
and it seems there is plenty of dead code we cannot cover with blackbox 
tests. One example is everything around TimeLeaseVmPoolMapDAOHibernate.

So I prepared a patch removing these classes. It builds fine (I tried to 
build it with command:
mvn2 install -Pgwt-admin,gwt-user,dep -DskipTests=true 
-Dgwt.userAgent=gecko1_8


The stat of my patch shows that much of lines were removed so it will 
raise the coverage number relatively much. If no one has complains, 
comments or objections, I'll post this patch to gerrit.


commit 304c606cc9919d7add073dfdc8d0761ea2c99636
Author: Jaroslav Henner <jhenner at redhat.com>
Date:   Mon Jan 2 14:54:31 2012 +0100

     Remove TimeLeapseVmPool.

  backend/manager/dbscripts/create_tables.sql        |   10 -
  backend/manager/dbscripts/create_views.sql         |    3 +-
  backend/manager/dbscripts/vm_pools_sp.sql          |  194 ----------
  .../bll/AttachAdGroupTimeLeasedPoolCommand.java    |   39 --
  .../bll/AttachUserToTimeLeasedPoolCommand.java     |   42 ---
  .../DetachAdGroupFromTimeLeasedPoolCommand.java    |   85 -----
  .../bll/DetachUserFromTimeLeasedPoolCommand.java   |   81 ----
  ...GetAdGroupsAttachedToTimeLeasedVmPoolQuery.java |   17 -
  .../core/bll/GetAllVmPoolsAttachedToUserQuery.java |   21 -
  .../bll/GetTimeLeasedUsersByVmPoolIdQuery.java     |   18 -
  .../core/bll/InitBackendServicesOnStartupBean.java |    2 -
  .../engine/core/bll/RemoveVmFromPoolCommand.java   |    7 +-
  .../engine/core/bll/TimeLeasedVmPoolManager.java   |  390 
--------------------
  .../bll/UpdateAdGroupTimeLeasedPoolCommand.java    |   30 --
  .../bll/UpdateUserToTimeLeasedPoolCommand.java     |   27 --
  .../ADElementTimeLeasedVmPoolParametersBase.java   |   27 --
  ...tachAdGroupTimeLeasedPoolCommandParameters.java |   27 --
  .../AttachUserToTimeLeasedPoolParameters.java      |   30 --
  .../common/action/UpdateUserVmPoolParameters.java  |   27 --
  .../common/action/VdcActionParametersBase.java     |    8 +-
  .../businessentities/time_lease_vm_pool_map.java   |  190 ----------
  .../time_lease_vm_pool_map_id.java                 |   63 ----
  .../java/org/ovirt/engine/core/dao/AdGroupDAO.java |    9 -
  .../engine/core/dao/AdGroupDAODbFacadeImpl.java    |   11 -
  .../engine/core/dao/AdGroupDAOHibernateImpl.java   |    8 -
  .../java/org/ovirt/engine/core/dao/DbUserDAO.java  |    9 -
  .../engine/core/dao/DbUserDAODbFacadeImpl.java     |   11 -
  .../engine/core/dao/DbUserDAOWrapperImpl.java      |    6 -
  .../java/org/ovirt/engine/core/dao/VmPoolDAO.java  |   11 -
  .../engine/core/dao/VmPoolDAODbFacadeImpl.java     |   65 ----
  .../engine/core/dao/VmPoolDAOHibernateImpl.java    |   30 --
  .../TimeLeaseVmPoolMapDAOHibernateImpl.java        |   11 -
  .../org/ovirt/engine/core/dao/BaseDAOTestCase.java |    2 -
  .../org/ovirt/engine/core/dao/VmPoolDAOTest.java   |   61 ---
  .../modules/dal/src/test/resources/fixtures.xml    |   15 -
  .../main/java/org/ovirt/engine/SharedGwt.gwt.xml   |    3 -
  36 files changed, 5 insertions(+), 1585 deletions(-)


Note a bug about (not only) this
https://bugzilla.redhat.com/show_bug.cgi?id=735997
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-TimeLeapseVmPool.patch
Type: text/x-patch
Size: 89292 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/engine-devel/attachments/20120103/7a04142a/attachment.bin>


More information about the Engine-devel mailing list