xmlBlaster 2.1.0 API

org.xmlBlaster.test.classtest.queue
Class JdbcQueueTest

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

public class JdbcQueueTest
extends junit.framework.TestCase

Test JdbcQueuePlugin failover when persistent store disappears.

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

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

Nested Class Summary
 class JdbcQueueTest.ConnectionConsumer
           
 
Field Summary
 int count
           
(package private)  boolean doExecute
           
(package private)  int exceptionCount
           
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
           
 java.util.List<I_Entry> queueList
           
private  long sizeOfMsg
           
(package private)  boolean suppressTest
           
 
Constructor Summary
JdbcQueueTest(Global glob, java.lang.String name, int currImpl, boolean doExecute)
          Constructor for junit not possible since we need to run it 3 times public JdbcQueueTest(String name) { super(name); for (int i=0; i < NUM_IMPL; i++) initialize(new Global(), name, i); }
 
Method Summary
 void initialEntries()
           
private  void initialize(Global glob, java.lang.String name, int currImpl)
           
static void main(java.lang.String[] args)
           java org.xmlBlaster.test.classtest.queue.JdbcQueueTest
 void multiplePut()
           
 void putWithBreak()
           
protected  void setUp()
           
static junit.framework.Test suite()
          Method is used by TestRunner to load these tests
 void tearDown()
           
 void testConnectionPool()
           
 void testInitialEntries()
           
 void testMultiplePut()
           
 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

exceptionCount

int exceptionCount

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

queueList

public java.util.List<I_Entry> queueList

PLUGIN_TYPES

public static java.lang.String[] PLUGIN_TYPES

count

public int count

suppressTest

boolean suppressTest

doExecute

boolean doExecute
Constructor Detail

JdbcQueueTest

public JdbcQueueTest(Global glob,
                     java.lang.String name,
                     int currImpl,
                     boolean doExecute)
Constructor for junit not possible since we need to run it 3 times public JdbcQueueTest(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

testInitialEntries

public void testInitialEntries()

initialEntries

public void initialEntries()
                    throws XmlBlasterException
Throws:
XmlBlasterException

testMultiplePut

public void testMultiplePut()

multiplePut

public void multiplePut()
                 throws XmlBlasterException
Throws:
XmlBlasterException

testConnectionPool

public void testConnectionPool()

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.JdbcQueueTest
 


xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.