xmlBlaster 1.6.2 API

org.xmlBlaster.test.cluster
Class DirtyReadTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.xmlBlaster.test.cluster.DirtyReadTest
All Implemented Interfaces:
junit.framework.Test

public class DirtyReadTest
extends junit.framework.TestCase

Test publishing a message to frodo which forwards it to heron, the message is dirty read in fordo.

 java -Djava.compiler= junit.textui.TestRunner -noloading org.xmlBlaster.test.cluster.DirtyReadTest
 
NOTE: asserts() in update() methods are routed back to server and are not handled by the junit testsuite, so we check double (see code).

See Also:
Cluster requirement

Field Summary
private  java.lang.String assertInUpdate
           
private  java.lang.String contentStr
           
private  I_XmlBlasterAccess frodoCon
           
private  Global glob
           
private  I_XmlBlasterAccess heronCon
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
private  ServerHelper serverHelper
           
private  int updateCounterFrodo
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
DirtyReadTest(java.lang.String name)
           
 
Method Summary
 void runIt(java.lang.String domain)
          We start all nodes as described in requirement cluster publish a message to bilbo which should be routed to heron.
protected  void setUp()
          Initialize the test ...
protected  void tearDown()
          cleaning up ...
 void testDirtyRead()
           
 void testNoDirtyRead()
           
 
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

private Global glob

log

private static java.util.logging.Logger log

serverHelper

private ServerHelper serverHelper

heronCon

private I_XmlBlasterAccess heronCon

frodoCon

private I_XmlBlasterAccess frodoCon

updateCounterFrodo

private int updateCounterFrodo

contentStr

private java.lang.String contentStr

assertInUpdate

private java.lang.String assertInUpdate
Constructor Detail

DirtyReadTest

public DirtyReadTest(java.lang.String name)
Method Detail

setUp

protected void setUp()
Initialize the test ...


tearDown

protected void tearDown()
cleaning up ...


testDirtyRead

public void testDirtyRead()

testNoDirtyRead

public void testNoDirtyRead()

runIt

public void runIt(java.lang.String domain)
We start all nodes as described in requirement cluster publish a message to bilbo which should be routed to heron. Than we try to access the message at heron and check if heron has not updated one to frodo because of dirtyRead configured in heron.properties


xmlBlaster 1.6.2 API

Copyright © 1999-2007 The xmlBlaster.org contributers.