xmlBlaster 2.2.0 API

org.xmlBlaster.test.client
Class TestPtPPersistent

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.xmlBlaster.test.client.TestPtPPersistent
All Implemented Interfaces:
junit.framework.Test

public class TestPtPPersistent
extends junit.framework.TestCase

Tests the sending of persistent PtP messages to a session while resourcea are critical (swapping of all queues and callback queue overflow) when both the server and client crash. Invoke examples:

   java junit.textui.TestRunner -noloading org.xmlBlaster.test.client.TestPtPPersistent
   java junit.swingui.TestRunner -noloading org.xmlBlaster.test.client.TestPtPPersistent
 

See Also:
I_XmlBlasterAccess

Field Summary
private  PtPDestination destination
           
private  Global glob
           
private static java.util.logging.Logger log
           
private static java.lang.String ME
           
private static long PUB_DELAY
           
private  long reconnectDelay
           
private  java.lang.String senderName
           
private  int serverPort
           
private  EmbeddedXmlBlaster serverThread
           
private  MsgInterceptor updateInterceptor
           
 
Constructor Summary
TestPtPPersistent(Global glob, java.lang.String testName)
           
TestPtPPersistent(java.lang.String testName)
           
 
Method Summary
 void doPublish(int counter, java.lang.String oid, boolean doGc, long sleep)
          TEST: Construct a message and publish it.
static void main(java.lang.String[] args)
          Deprecated. Use the TestRunner from the testsuite to run it:

   java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.client.TestPtPPersistent
 void persistentPtP(java.lang.String oid, boolean doGc)
          TEST:
Sets up a PtP destination (a subject)
protected  void setUp()
          Sets up the fixture.
protected  void tearDown()
          Tears down the fixture.
 void testPersistentPtPNoOidNoGc()
           
 void testPersistentPtPNoOidWithGc()
           
 void testPersistentPtPOneOidNoGc()
           
 void testPersistentPtPOneOidWithGc()
           
 
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, 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

ME

private static java.lang.String ME

PUB_DELAY

private static final long PUB_DELAY
See Also:
Constant Field Values

glob

private Global glob

log

private static java.util.logging.Logger log

serverPort

private int serverPort

serverThread

private EmbeddedXmlBlaster serverThread

updateInterceptor

private MsgInterceptor updateInterceptor

senderName

private java.lang.String senderName

reconnectDelay

private final long reconnectDelay
See Also:
Constant Field Values

destination

private PtPDestination destination
Constructor Detail

TestPtPPersistent

public TestPtPPersistent(java.lang.String testName)

TestPtPPersistent

public TestPtPPersistent(Global glob,
                         java.lang.String testName)
Method Detail

setUp

protected void setUp()
Sets up the fixture.

Connect to xmlBlaster and login

Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
Tears down the fixture.

cleaning up .... erase() the previous message OID and logout

Overrides:
tearDown in class junit.framework.TestCase

doPublish

public void doPublish(int counter,
                      java.lang.String oid,
                      boolean doGc,
                      long sleep)
               throws XmlBlasterException
TEST: Construct a message and publish it.

Throws:
XmlBlasterException

testPersistentPtPOneOidWithGc

public void testPersistentPtPOneOidWithGc()

testPersistentPtPOneOidNoGc

public void testPersistentPtPOneOidNoGc()

testPersistentPtPNoOidWithGc

public void testPersistentPtPNoOidWithGc()

testPersistentPtPNoOidNoGc

public void testPersistentPtPNoOidNoGc()

persistentPtP

public void persistentPtP(java.lang.String oid,
                          boolean doGc)
TEST:
Sets up a PtP destination (a subject)


main

public static void main(java.lang.String[] args)
Deprecated. Use the TestRunner from the testsuite to run it:

   java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.client.TestPtPPersistent

Invoke: java org.xmlBlaster.test.client.TestPtPPersistent


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.