Methods Summary |
---|
protected void | setUp()
super.setUp();
channel = new GroupChannel();
|
protected void | tearDown()
super.tearDown();
try {channel.stop(channel.DEFAULT);}catch (Exception ignore){}
|
public void | testDoubleFullStart()
int count = 0;
try {
channel.start(channel.DEFAULT);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
channel.start(channel.DEFAULT);
count++;
} catch ( Exception x){x.printStackTrace();}
assertEquals(count,2);
channel.stop(channel.DEFAULT);
|
public void | testDoublePartialStart()
//try to double start the RX
int count = 0;
try {
channel.start(channel.SND_RX_SEQ);
channel.start(channel.MBR_RX_SEQ);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
channel.start(channel.MBR_RX_SEQ);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,1);
channel.stop(channel.DEFAULT);
//double the membership sender
count = 0;
try {
channel.start(channel.SND_RX_SEQ);
channel.start(channel.MBR_TX_SEQ);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
channel.start(channel.MBR_TX_SEQ);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,1);
channel.stop(channel.DEFAULT);
count = 0;
try {
channel.start(channel.SND_RX_SEQ);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
channel.start(channel.SND_RX_SEQ);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,1);
channel.stop(channel.DEFAULT);
count = 0;
try {
channel.start(channel.SND_TX_SEQ);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
channel.start(channel.SND_TX_SEQ);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,1);
channel.stop(channel.DEFAULT);
|
public void | testFalseOption()
int flag = 0xFFF0;//should get ignored by the underlying components
int count = 0;
try {
channel.start(flag);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
channel.start(flag);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,2);
channel.stop(channel.DEFAULT);
|
public void | testScrap()
System.out.println(channel.getChannelReceiver().getClass());
((ReceiverBase)channel.getChannelReceiver()).setMaxThreads(1);
|