frysk.proc
Class TestTaskTerminateObserver

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by frysk.junit.TestCase
              extended by frysk.testbed.TestLib
                  extended by frysk.proc.TestTaskTerminateObserver
All Implemented Interfaces:
Test

public class TestTaskTerminateObserver
extends TestLib

Check the Task terminating and terminated observers.


Nested Class Summary
private  class TestTaskTerminateObserver.Terminate
          Save the Terminating, and Terminated values as they pass by.
private static class TestTaskTerminateObserver.TerminatingCounter
           
 
Field Summary
private static int INVALID
           
 
Fields inherited from class frysk.testbed.TestLib
host
 
Constructor Summary
TestTaskTerminateObserver()
           
 
Method Summary
 void check(int expected, int terminating, int terminated)
          When either Terminating, and Terminated is not INVALID, install and verify corresponding observers.
 void terminate(int expected)
          Check that both the Terminating, and Terminated values match EXPECTED.
 void terminated(int expected)
          Check that the Terminated value matches EXPECTED.
 void terminating(int expected)
          Check that the Terminating value matches EXPECTED.
 void testAttachToUnJoinedTask()
          Check that a process with a task, that has exited, but not yet been joined (i.e., in the 'X' state) can be attached and than followed through to its termination.
 void testTerminatedExit0()
           
 void testTerminatedExit47()
           
 void testTerminatedKillHUP()
           
 void testTerminatedKillINT()
           
 void testTerminatedKillKILL()
           
 void testTerminateExit0()
           
 void testTerminateExit47()
           
 void testTerminateKillHUP()
           
 void testTerminateKillINT()
           
 void testTerminatingExit0()
           
 void testTerminatingExit47()
           
 void testTerminatingKillHUP()
           
 void testTerminatingKillINT()
           
 
Methods inherited from class frysk.testbed.TestLib
addToTearDown, addToTearDown, assertRunToFindProc, assertRunUntilStop, assertRunUntilStop, getExecPath, isChildOf, isChildOfMine, isDescendantOf, isDescendantOfMine, runPending, setUp, tearDown
 
Methods inherited from class frysk.junit.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, getTimeoutMilliseconds, getTimeoutSeconds, missing32or64, unresolved, unresolvedOffUtrace, unresolvedOn32On64, unresolvedOnIA32, unresolvedOnPPC, unresolvedOnUtrace, unresolvedOnx8664, unsupported
 
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, 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
 

Field Detail

INVALID

private static int INVALID
Constructor Detail

TestTaskTerminateObserver

public TestTaskTerminateObserver()
Method Detail

check

public void check(int expected,
                  int terminating,
                  int terminated)
When either Terminating, and Terminated is not INVALID, install and verify corresponding observers.


terminate

public void terminate(int expected)
Check that both the Terminating, and Terminated values match EXPECTED.


terminating

public void terminating(int expected)
Check that the Terminating value matches EXPECTED.


terminated

public void terminated(int expected)
Check that the Terminated value matches EXPECTED.


testTerminateExit0

public void testTerminateExit0()

testTerminateExit47

public void testTerminateExit47()

testTerminateKillINT

public void testTerminateKillINT()

testTerminateKillHUP

public void testTerminateKillHUP()

testTerminatingExit0

public void testTerminatingExit0()

testTerminatingExit47

public void testTerminatingExit47()

testTerminatingKillINT

public void testTerminatingKillINT()

testTerminatingKillHUP

public void testTerminatingKillHUP()

testTerminatedExit0

public void testTerminatedExit0()

testTerminatedExit47

public void testTerminatedExit47()

testTerminatedKillINT

public void testTerminatedKillINT()

testTerminatedKillKILL

public void testTerminatedKillKILL()

testTerminatedKillHUP

public void testTerminatedKillHUP()

testAttachToUnJoinedTask

public void testAttachToUnJoinedTask()
Check that a process with a task, that has exited, but not yet been joined (i.e., in the 'X' state) can be attached and than followed through to its termination.