xmlBlaster 2.1.0 API

org.xmlBlaster.test.classtest.queue
Class CacheQueueDisconnectTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.xmlBlaster.test.classtest.queue.CacheQueueDisconnectTest
All Implemented Interfaces:
junit.framework.Test

public class CacheQueueDisconnectTest
extends junit.framework.TestCase

Test JdbcQueuePlugin failover when persistent store disappears.

Invoke: java org.xmlBlaster.test.classtest.queue.CacheQueueDisconnectTest

Test database with PostgreSQL:

 initdb /tmp/postgres
 cp /var/lib/pgsql/data/pg_hba.conf /tmp/postgres    (edit host access)
 createdb test
 postmaster -i -D /tmp/postgres
 

See Also:
I_Queue, org.xmlBlaster.util.queue.jdbc.JdbcQueuePlugin

Field Summary
 int count
           
protected  Global glob
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
static java.lang.String[] PLUGIN_TYPES
           
private  I_Queue queue
           
private  long sizeOfMsg
           
(package private)  boolean suppressTest
           
 
Constructor Summary
CacheQueueDisconnectTest(Global glob, java.lang.String name, int currImpl)
          Constructor for junit not possible since we need to run it 3 times public CacheQueueDisconnectTest(String name) { super(name); for (int i=0; i < NUM_IMPL; i++) initialize(new Global(), name, i); }
 
Method Summary
private  void initialize(Global glob, java.lang.String name, int currImpl)
           
static void main(java.lang.String[] args)
           java org.xmlBlaster.test.classtest.queue.CacheQueueDisconnectTest
 void putWithBreak()
           
protected  void setUp()
           
static junit.framework.Test suite()
          Method is used by TestRunner to load these tests
 void tearDown()
           
 void testPutWithBreak()
           
 
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 java.lang.String ME

glob

protected Global glob

log

private static java.util.logging.Logger log

sizeOfMsg

private long sizeOfMsg

queue

private I_Queue queue

PLUGIN_TYPES

public static java.lang.String[] PLUGIN_TYPES

count

public int count

suppressTest

boolean suppressTest
Constructor Detail

CacheQueueDisconnectTest

public CacheQueueDisconnectTest(Global glob,
                                java.lang.String name,
                                int currImpl)
Constructor for junit not possible since we need to run it 3 times public CacheQueueDisconnectTest(String name) { super(name); for (int i=0; i < NUM_IMPL; i++) initialize(new Global(), name, i); }

Method Detail

initialize

private void initialize(Global glob,
                        java.lang.String name,
                        int currImpl)

setUp

protected void setUp()
Overrides:
setUp in class junit.framework.TestCase

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

testPutWithBreak

public void testPutWithBreak()

putWithBreak

public void putWithBreak()
                  throws XmlBlasterException
Throws:
XmlBlasterException

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)
  java org.xmlBlaster.test.classtest.queue.CacheQueueDisconnectTest
 


xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.