public class EPPSessionPoolTst
extends junit.framework.TestCase
Modifier and Type | Field and Description |
---|---|
protected static EPPApplicationSingle |
app
Handle to the Singleton EPP Application instance
(
EPPApplicationSingle ) |
protected static java.lang.String |
configFileName
Name of configuration file to use for test (default = epp.config).
|
protected static EPPSessionPool |
sessionPool
EPP Session pool associated with test
|
Constructor and Description |
---|
EPPSessionPoolTst(java.lang.String name)
Allocates an
EPPSessionPoolTst with a logical name. |
Modifier and Type | Method and Description |
---|---|
protected EPPSession |
borrowSession()
Utility method to borrow a session from the session pool.
|
protected void |
invalidateSession(EPPSession aSession)
Utility method to invalidate a session in the session pool.
|
static void |
main(java.lang.String[] args)
Unit test main, which accepts the following system property options:
iterations Number of unit test iterations to run validate Turn XML validation on ( true ) or off
(false ). |
static void |
printEnd(java.lang.String aTest)
Print the end of a test with the
Thread name if the current
thread is a TestThread . |
static void |
printStart(java.lang.String aTest)
Print the start of a test with the
Thread name if the
current thread is a TestThread . |
protected void |
returnSession(EPPSession aSession)
Utility method to return a session to the session pool.
|
protected void |
setUp()
JUNIT
setUp method |
static junit.framework.Test |
suite()
JUNIT
suite static method, which returns the tests
associated with EPPSessionPoolTst . |
protected void |
tearDown()
JUNIT
tearDown , which currently does nothing. |
void |
testAbsoluteTimeout()
Print out the number of active and idle sessions prior to
sleeping for 1 second past the absolute timeout, which should result
in the sessions getting refreshed.
|
void |
testCloseSession()
Test the handling of a session that is closed by the server by
sending a poll aock with the message ID "CLOSE-SESSION-TEST".
|
void |
testEndSession()
Unit test of
EPPSession.endSession . |
void |
testHello()
Unit test of
EPPSession.sendHello command. |
void |
testIdleTimeout()
Test that the idle timeout is working by sleeping for 1 second past
the idle timeout.
|
void |
testPoll()
Unit test of
EPPSession.sendPoll command. |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
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
protected static EPPApplicationSingle app
EPPApplicationSingle
)protected static java.lang.String configFileName
protected static EPPSessionPool sessionPool
public EPPSessionPoolTst(java.lang.String name)
EPPSessionPoolTst
with a logical name. The
constructor will initialize the base class TestCase
with
the logical name.name
- Logical name of the testpublic void testHello()
EPPSession.sendHello
command. The session
attribute is initialized with the attributes defined in the EPP sample
files.public void testPoll()
EPPSession.sendPoll
command.public void testCloseSession()
public void testEndSession()
EPPSession.endSession
. One session in the
session pool wil be ended.public void testAbsoluteTimeout()
public void testIdleTimeout()
protected void setUp()
setUp
methodsetUp
in class junit.framework.TestCase
protected void tearDown()
tearDown
, which currently does nothing.tearDown
in class junit.framework.TestCase
public static junit.framework.Test suite()
suite
static method, which returns the tests
associated with EPPSessionPoolTst
.public static void main(java.lang.String[] args)
true
) or off
(false
). If validate is not specified, validation will be
off.
args
- DOCUMENT ME!public static void printStart(java.lang.String aTest)
Thread
name if the
current thread is a TestThread
.aTest
- name for the testpublic static void printEnd(java.lang.String aTest)
Thread
name if the current
thread is a TestThread
.aTest
- name for the testprotected EPPSession borrowSession()
protected void invalidateSession(EPPSession aSession)
aSession
- Session to invalidate in the poolprotected void returnSession(EPPSession aSession)
aSession
- Session to return to the pool