org.ourgrid.mygrid.scheduler.test
Class WorkqueueTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.ourgrid.mygrid.scheduler.test.WorkqueueTest
All Implemented Interfaces:
junit.framework.Test, FastTest, PreCommitTest, SchedulerFastTest, SchedulerPreCommitTest, SelectiveTest, StressTest

public class WorkqueueTest
extends junit.framework.TestCase
implements SchedulerFastTest


Constructor Summary
WorkqueueTest(java.lang.String name)
          Constructor for WorkqueueTest.
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testAddJob()
          Creates a handful of jobs, submits them to workqueue, and check if the jobs are there.
 void testGetNumberOfGuMsNeeded()
           
 void testScheduleOneJob()
           
 void testScheduleOneJobWithReplication()
           
 void testScheduleThreeJobs()
           
 void testScheduleThreeJobsWithReplication()
           
 void testScheduleThreeJobsWithReplicationIntercalated()
          This test verifies if the heuristic scheduled the replicas in the correct order.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 

Constructor Detail

WorkqueueTest

public WorkqueueTest(java.lang.String name)
              throws java.lang.SecurityException
Constructor for WorkqueueTest.

Parameters:
name -
Throws:
java.lang.SecurityException
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testAddJob

public void testAddJob()
                throws java.lang.Exception
Creates a handful of jobs, submits them to workqueue, and check if the jobs are there.

Throws:
java.lang.Exception - when a called method throws an exception

testGetNumberOfGuMsNeeded

public void testGetNumberOfGuMsNeeded()
                               throws TaskSpecificationException,
                                      JobSpecificationException
Throws:
TaskSpecificationException
JobSpecificationException

testScheduleOneJob

public void testScheduleOneJob()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testScheduleThreeJobs

public void testScheduleThreeJobs()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testScheduleOneJobWithReplication

public void testScheduleOneJobWithReplication()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testScheduleThreeJobsWithReplication

public void testScheduleThreeJobsWithReplication()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

testScheduleThreeJobsWithReplicationIntercalated

public void testScheduleThreeJobsWithReplicationIntercalated()
                                                      throws java.lang.Exception
This test verifies if the heuristic scheduled the replicas in the correct order. These test simulates job adding during other jobs execution. The order of the scheduled replicas must be: ( 1.1, 1.2, 1.3, 1.4, 1.5, 1.1', 1.2', 1.3', 2.1, 2.2, 2.3, 2.4, 2.5, 1.4', 1.5', 2.1', 2.2', 2.3', 2.4', 2.5', 1.1'', 1.2'', 1.3'', 1.4'', 1.5'', 2.1'', 2.2'', 3.1, 3.2, 3.3, 3.4, 3.5, 3.1', 3.2', 3.3', 3.4', 3.5', 2.3'', 2.4'', 2.5'', 3.1'', 3.2'', 3.3'', 3.4'', 3.5'' )

Throws:
java.lang.Exception