|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.TestCase
org.jboss.test.jbossmx.compliance.TestCase (src)
org.jboss.test.jbossmx.compliance.timer.BasicTestCase
Basic timer test.
The aim of these tests is to check the most common uses of the timer service.
Field Summary |
Fields inherited from class org.jboss.test.jbossmx.compliance.TestCase (src) |
log, MBEAN_SERVER_DELEGATE, PERIOD, REPEATS, WAIT |
Constructor Summary | |
BasicTestCase(java.lang.String s)
|
Method Summary | |
void |
checkNotificationID(TimerNotification (src) pNotification,
java.lang.Integer pNotificationID)
Checks if the given Notification ID is the same as the one of the given Notification |
void |
checkTimeDifference(TimerNotification (src) pNotificationOne,
TimerNotification (src) pNotificationTwo,
long pTimeDiffernce)
Checks if the time between the two Notification is in a +- 10% limit |
void |
expectNotifications(int expected)
Wait for the timer notification and see if we have the correct number hopefully this should synchronize this test with the timer thread. |
void |
expectNotifications(int expected,
long wait)
Wait for the timer notification and see if we have the correct number hopefully this should synchronize this test with the timer thread. |
void |
handleNotification(Notification (src) notification,
java.lang.Object handback)
Handle a notification, just add it to the list |
void |
testInfiniteNotification()
Test infinite notification works. |
void |
testRepeatedNotification()
Test a repeated notification works. |
void |
testSingleNotification()
Test a single notification works. |
void |
testTwoNotificationProducers()
Test two infinite notification works. |
Methods inherited from class org.jboss.test.jbossmx.compliance.TestCase (src) |
testServerFound |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicTestCase(java.lang.String s)
Method Detail |
public void testSingleNotification() throws java.lang.Exception
java.lang.Exception
public void testRepeatedNotification() throws java.lang.Exception
java.lang.Exception
public void testInfiniteNotification() throws java.lang.Exception
java.lang.Exception
public void testTwoNotificationProducers() throws java.lang.Exception
java.lang.Exception
public void handleNotification(Notification (src) notification, java.lang.Object handback)
handleNotification
in interface NotificationListener (src)
notification
- the notification receivedhandback
- not usedpublic void expectNotifications(int expected) throws java.lang.Exception
expected
- the number of notifications expected
java.lang.Exception
- when the notifications are incorrectpublic void expectNotifications(int expected, long wait) throws java.lang.Exception
expected
- the number of notifications expectedwait
- time in milli seconds to wait for the notification
java.lang.Exception
- when the notifications are incorrectpublic void checkNotificationID(TimerNotification (src) pNotification, java.lang.Integer pNotificationID)
pNotification
- Notification to be testedpNotificationID
- Id the Notification should havepublic void checkTimeDifference(TimerNotification (src) pNotificationOne, TimerNotification (src) pNotificationTwo, long pTimeDiffernce)
pNotificationOne
- First Notification to be testedpNotificationTwo
- Second Notification to be testedpTimeDiffernce
- Expected Time Difference
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |