xmlBlaster 2.2.0 API

org.xmlBlaster.test.cluster
Class SubscribeTest

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

public class SubscribeTest
extends junit.framework.TestCase

Test publishing a message from bilbo to heron.

 java -Djava.compiler= junit.textui.TestRunner -noloading org.xmlBlaster.test.cluster.SubscribeTest
 
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  I_XmlBlasterAccess avalonCon
           
private  I_XmlBlasterAccess bilboCon
           
private  I_XmlBlasterAccess bilboCon2
           
private  java.lang.String contentStr
           
private  java.lang.String domain
           
private  I_XmlBlasterAccess frodoCon
           
private  Global glob
           
private  I_XmlBlasterAccess golanCon
           
private  I_XmlBlasterAccess heronCon
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
private  java.lang.String oid
           
private  ServerHelper serverHelper
           
private  int updateCounterBilbo
           
private  int updateCounterBilbo2
           
 
Constructor Summary
SubscribeTest(java.lang.String name)
           
 
Method Summary
protected  void setUp()
          Initialize the test ...
protected  void tearDown()
          cleaning up ...
 void testSubscribe()
          We start all nodes as described in requirement cluster

1.

 void testSubscribeTwice()
          We start all nodes as described in requirement cluster

- Subscribe to RUGBY messages from bilbo twice
- publish RUGBY messages to avalon (heron is the master)
- Kill bilbo, restart bilbo and check if we still get them

private  void waitOnUpdate(long timeout, int numWait)
           
 
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

avalonCon

private I_XmlBlasterAccess avalonCon

golanCon

private I_XmlBlasterAccess golanCon

frodoCon

private I_XmlBlasterAccess frodoCon

bilboCon

private I_XmlBlasterAccess bilboCon

bilboCon2

private I_XmlBlasterAccess bilboCon2

updateCounterBilbo

private int updateCounterBilbo

updateCounterBilbo2

private int updateCounterBilbo2

oid

private java.lang.String oid

domain

private java.lang.String domain

contentStr

private java.lang.String contentStr
Constructor Detail

SubscribeTest

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

setUp

protected void setUp()
Initialize the test ...

Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
cleaning up ...

Overrides:
tearDown in class junit.framework.TestCase

testSubscribeTwice

public void testSubscribeTwice()
We start all nodes as described in requirement cluster

- Subscribe to RUGBY messages from bilbo twice
- publish RUGBY messages to avalon (heron is the master)
- Kill bilbo, restart bilbo and check if we still get them


testSubscribe

public void testSubscribe()
We start all nodes as described in requirement cluster

1. publish RUGBY messages to avalon (heron is the master)
2. Subscribe those messages from bilbo
3. Kill bilbo, restart bilbo and check if we still get them


waitOnUpdate

private void waitOnUpdate(long timeout,
                          int numWait)

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.