|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.test.functionalunits.MyGridUnit
public class MyGridUnit
MyGridUnit
will represents a mygrid that will be used to
execute functional tests of OurGrid. A default creation of a
MyGridUnit
will find and use a disponible port, address and
any other detail that isn't needed to a test. Also is possible interact
between functional tests unit to permit a easy way to create and mantain any
test. This class will execute scripts to control the MyGrid.
Method Summary | |
---|---|
int |
addJob(java.io.File job)
Add a job to this MyGrid. |
void |
destroy()
This method is used to delete enviroment files that the FunctionalTestUnit uses. |
java.lang.String |
getAddress()
Gets the address that this peer is published. |
java.lang.String |
getDefaultPropertiesFile()
Returns the default properties file that will be used by this FunctionalTestUnit . |
java.lang.String |
getHostname()
Get the hostname of the peer. |
ExecutionStatus |
getJobStatus(int jobId)
Verify the status of an job. |
java.lang.String |
getName()
Returns the name of this FunctionalTestUnit . |
int |
getPort()
Get the port of the mygrid. |
java.util.Collection |
getRunningGums()
This method will get the running gums at this MyGrid at a map that associates each jobId (if any that is running) with a collection of running gums. |
boolean |
isRunning()
Verify if this mygrid is running. |
void |
kill()
Kills this unit by calling System.exit() |
void |
setPeer(PeerUnit peer)
Set the peer that this MyGrid will contact. |
void |
start()
Starts this MyGridUnit . |
boolean |
stillIdle()
This method verifies if the functional test unit was not waken up since the last waitUntilWorkIsDone() call. |
void |
stop()
Stops this MyGridUnit . |
void |
waitForJob(int jobid)
Waits for a job to finish. |
void |
waitUntilWorkIsDone()
This method will block until this FunctionalTestUnit has
stopped all work. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.String getAddress()
public java.lang.String getName()
FunctionalTestUnit
FunctionalTestUnit
.
getName
in interface FunctionalTestUnit
FunctionalTestUnit
.FunctionalTestUnit.getName()
public java.lang.String getHostname()
getHostname
in interface FunctionalTestUnit
public int getPort()
getPort
in interface FunctionalTestUnit
public java.lang.String getDefaultPropertiesFile()
FunctionalTestUnit
FunctionalTestUnit
.
getDefaultPropertiesFile
in interface FunctionalTestUnit
FunctionalTestUnit.getDefaultPropertiesFile()
public void setPeer(PeerUnit peer) throws java.lang.Exception
peer
- PeerUnit
object to be used as test.
java.lang.Exception
public void start() throws java.lang.Exception
MyGridUnit
.
start
in interface FunctionalTestUnit
java.lang.Exception
public void stop() throws java.lang.Exception
MyGridUnit
.
stop
in interface FunctionalTestUnit
java.lang.Exception
public boolean isRunning()
isRunning
in interface FunctionalTestUnit
public int addJob(java.io.File job) throws java.lang.Exception
job
- Job to be added to this MyGrid.
java.lang.Exception
public ExecutionStatus getJobStatus(int jobId) throws java.lang.Exception
jobId
- JobId to verify the status.
java.lang.Exception
public java.util.Collection getRunningGums() throws java.lang.Exception
java.lang.Exception
public void waitForJob(int jobid) throws java.lang.Exception
jobid
- Id of the job to wait.
java.lang.Exception
public void destroy()
FunctionalTestUnit
FunctionalTestUnit
uses.
destroy
in interface FunctionalTestUnit
public void waitUntilWorkIsDone() throws java.lang.Exception
FunctionalTestUnit
FunctionalTestUnit
has
stopped all work.
waitUntilWorkIsDone
in interface FunctionalTestUnit
java.lang.Exception
public boolean stillIdle() throws java.lang.Exception
FunctionalTestUnit
waitUntilWorkIsDone()
call.
stillIdle
in interface FunctionalTestUnit
java.lang.Exception
public void kill() throws java.lang.Exception
FunctionalTestUnit
System.exit()
kill
in interface FunctionalTestUnit
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |