test.stress.timer
Class TimerTestCase

java.lang.Object
  extended byTestCase
      extended bytest.stress.timer.TimerTestCase
All Implemented Interfaces:
java.util.EventListener, NotificationListener (src)

public class TimerTestCase
extends TestCase
implements NotificationListener (src)

Timer Stress Tests This test works by starting a lot of notifications at the start and checks the concurrency by performing lots of operations.

It then waits for the slow notifications to complete allowing any lag due to slower computers to be caught up with.

Any concurrency problem or dropped notifications should show up when the test times out and the target notifications are not reached.

See Also:
Serialized Form

Constructor Summary
TimerTestCase(java.lang.String s)
          Construct the test
 
Method Summary
 void handleNotification(Notification (src)  n, java.lang.Object ignored)
          Handle the notification, just add it to the list
 void testTortureOne()
          Test the timer under stress conditions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimerTestCase

public TimerTestCase(java.lang.String s)
Construct the test

Method Detail

testTortureOne

public void testTortureOne()
                    throws java.lang.Exception
Test the timer under stress conditions

Throws:
java.lang.Exception

handleNotification

public void handleNotification(Notification (src)  n,
                               java.lang.Object ignored)
Handle the notification, just add it to the list

Specified by:
handleNotification in interface NotificationListener (src)
Parameters:
n - the notification object
ignored - the handback object given to the broadcaster upon listener registration