Opened 12 years ago

Last modified 10 years ago

#890 new task

IZ575: Need junit tests for GEAdapter

Reported by: rhierlmeier Owned by:
Priority: normal Milestone:
Component: hedeby Version: 1.0
Severity: Keywords: Sun unit_test


[Imported from gridengine issuezilla]

        Issue #:      575             Platform:     Sun         Reporter: rhierlmeier (rhierlmeier)
       Component:     hedeby             OS:        All
     Subcomponent:    unit_test       Version:      1.0            CC:    None defined
        Status:       NEW             Priority:     P3
      Resolution:                    Issue type:    TASK
                                  Target milestone: 1.0u5next
      Assigned to:    adoerr (adoerr)
      QA Contact:     adoerr
       * Summary:     Need junit tests for GEAdapter
   Status whiteboard:

     Issue 575 blocks:   [DEL: 595 :DEL] 595
   Votes for issue 575:                     Vote for this issue

   Opened: Tue Sep 23 07:03:00 -0700 2008 

   Need junit tests for GEAdapter


   Due to the complex environment of GEAdapter currently nearly no junit tests for
   GEAdapter are implemented. Testing certain timing issues with testsuite tests is
   not always possible. We have reached the point where need a mocked up
   environment for the GEAdapter.


   The fix if the issue will improve the quality of the GEAdapter.

   Suggested Fix/Work Around

   Create a mockedup enviroment for GEAdapter and implement junit tests for GEAdapter.


   1. Need a mockup class GEConnection with the following requirements:

   o mockup the EXECD events
   o mockup of a qstat over jgdi
   o define a predefined list of execds (method getExecdList)
   o mockup jobs (GET/DEL, suspend, reschedule)
   o mockup for the admin host list (ADD/DEL/GET)
   o mockup for get/mod/enabling/disabling/suspend queues

   Out of the GEConnection class an interface must be extracted. The GEConnection
   class must be renamed into GEConnectionImpl.

   2. Need a mockup for class GEServiceConfigHelper

   o mockup the configuration of the GEService
   o mockup the static host detection
   o mockup qmaster host detection
   o mockup for execd installer script
   o mockup for execd uninstall script

   3. Need mockup for class GEServiceImpl

   The GEServiceImpl class holds the GEConnect and the GEServiceConfigHelper. To
   test HostManager we a mockup for this class (extract interface out of the
   classes, provide real implementation and mocked implementation).

   4. Need mockup for class HostManager

   o mockup for add/remove/modify a host
   o mockup for simulating auto discovery (generate events)

   5. Need mockup for class ExecdInstaller

   Allows to mockup the result of an execd installation.

   6. Need mockup for class ExecdUninstaller

   Allows to mockup the result of an execd uninstallation.

   7. Need mockup for class Host

   Provides the functionality to mockup

   o the host state
   o the update of the resource properties,

   Based on this mockups we can implement a couple of junit tests for GEAdapter.

   How to test


   ATC: 0.5 PD
   ETC: 15 PD
               ------- Additional comments from rhierlmeier Wed Nov 25 07:21:11 -0700 2009 -------
   Milestone changed

Change History (0)

Note: See TracTickets for help on using tickets.