xmlBlaster 2.1.0 API

org.xmlBlaster.test.client
Class TestSynchronousCache

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

public class TestSynchronousCache
extends junit.framework.TestCase

Here we test the client side synchronous cache for high performing getCached() invocations.

Invoke examples:

    java junit.textui.TestRunner org.xmlBlaster.test.client.TestSynchronousCache

    java junit.swingui.TestRunner -noloading org.xmlBlaster.test.client.TestSynchronousCache
 

See Also:
The client.cache requirement, SynchronousCache

Field Summary
private  I_XmlBlasterAccess con
           
private  java.lang.String[] contentArr
           
private  Global glob
           
private static java.util.logging.Logger log
           
private  java.lang.String[] publishOidArr
           
private  int serverPort
           
private  EmbeddedXmlBlaster serverThread
           
private  boolean startEmbedded
           
private  SynchronousCache synchronousCache
           
private  MsgInterceptor updateInterceptor
           
 
Constructor Summary
TestSynchronousCache(Global glob, java.lang.String testName)
          Constructs the TestSynchronousCache object.
 
Method Summary
static void main(java.lang.String[] args)
          Invoke: java org.xmlBlaster.test.client.TestSynchronousCache -startEmbedded false
 PublishReturnQos publishMsg(java.lang.String publishOid, java.lang.String content)
          Publish an almost volatile message.
 EraseReturnQos[] sendErase(java.lang.String publishOid)
           
protected  void setUp()
          Sets up the fixture.
static junit.framework.Test suite()
          Method is used by TestRunner to load these tests
protected  void tearDown()
          Tears down the fixture.
 void testCachedAccess()
          THIS IS THE TEST
 
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

glob

private Global glob

log

private static java.util.logging.Logger log

con

private I_XmlBlasterAccess con

updateInterceptor

private MsgInterceptor updateInterceptor

serverThread

private EmbeddedXmlBlaster serverThread

serverPort

private int serverPort

startEmbedded

private boolean startEmbedded

synchronousCache

private SynchronousCache synchronousCache

publishOidArr

private java.lang.String[] publishOidArr

contentArr

private java.lang.String[] contentArr
Constructor Detail

TestSynchronousCache

public TestSynchronousCache(Global glob,
                            java.lang.String testName)
Constructs the TestSynchronousCache object.

Parameters:
testName - The name used in the test suite
loginName - The name to login to the xmlBlaster
Method Detail

setUp

protected void setUp()
Sets up the fixture.

Creates a CORBA connection and does a login.
- One connection for the sender client

Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
Tears down the fixture.

cleaning up .... logout

Overrides:
tearDown in class junit.framework.TestCase

sendErase

public EraseReturnQos[] sendErase(java.lang.String publishOid)

publishMsg

public PublishReturnQos publishMsg(java.lang.String publishOid,
                                   java.lang.String content)
Publish an almost volatile message.


testCachedAccess

public void testCachedAccess()
THIS IS THE TEST

We publish some messages and try cached access.


suite

public static junit.framework.Test suite()
Method is used by TestRunner to load these tests


main

public static void main(java.lang.String[] args)
Invoke: java org.xmlBlaster.test.client.TestSynchronousCache -startEmbedded false


xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.