Author: kkolinko
Date: Sat Nov 7 16:50:20 2015
New Revision: 1713154
URL: http://svn.apache.org/viewvc?rev=1713154&view=rev
Log:
Fix warnings in test classes - Static fields should be accessed in a static way
Modified:
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java
Modified:
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java?rev=1713154&r1=1713153&r2=1713154&view=diff
==============================================================================
---
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
(original)
+++
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
Sat Nov 7 16:50:20 2015
@@ -23,6 +23,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.apache.catalina.tribes.Channel;
import org.apache.catalina.tribes.ChannelException;
import org.apache.catalina.tribes.ChannelInterceptor;
@@ -46,7 +47,7 @@ public class TestGroupChannelOptionFlag
@After
public void tearDown() throws Exception {
- if ( channel != null ) try {channel.stop(channel.DEFAULT);}catch (
Exception ignore) {}
+ if ( channel != null ) try {channel.stop(Channel.DEFAULT);}catch (
Exception ignore) {}
channel = null;
}
@@ -61,7 +62,7 @@ public class TestGroupChannelOptionFlag
i.setOptionFlag(128);
channel.addInterceptor(i);
try {
- channel.start(channel.DEFAULT);
+ channel.start(Channel.DEFAULT);
}catch ( ChannelException x ) {
if ( x.getMessage().indexOf("option flag conflict") >= 0 ) error =
true;
}
@@ -82,7 +83,7 @@ public class TestGroupChannelOptionFlag
i.setOptionFlag(256);
channel.addInterceptor(i);
try {
- channel.start(channel.DEFAULT);
+ channel.start(Channel.DEFAULT);
}catch ( ChannelException x ) {
if ( x.getMessage().indexOf("option flag conflict") >= 0 ) error =
true;
}
Modified:
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java?rev=1713154&r1=1713153&r2=1713154&view=diff
==============================================================================
---
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java
(original)
+++
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java
Sat Nov 7 16:50:20 2015
@@ -22,6 +22,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.apache.catalina.tribes.Channel;
import org.apache.catalina.tribes.transport.ReceiverBase;
/**
@@ -38,22 +39,22 @@ public class TestGroupChannelStartStop {
@After
public void tearDown() throws Exception {
- try {channel.stop(channel.DEFAULT);}catch (Exception ignore){ /*
Ignore */ }
+ try {channel.stop(Channel.DEFAULT);}catch (Exception ignore){ /*
Ignore */ }
}
@Test
public void testDoubleFullStart() throws Exception {
int count = 0;
try {
- channel.start(channel.DEFAULT);
+ channel.start(Channel.DEFAULT);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
- channel.start(channel.DEFAULT);
+ channel.start(Channel.DEFAULT);
count++;
} catch ( Exception x){x.printStackTrace();}
assertEquals(count,2);
- channel.stop(channel.DEFAULT);
+ channel.stop(Channel.DEFAULT);
}
@Test
@@ -67,53 +68,53 @@ public class TestGroupChannelStartStop {
//try to double start the RX
int count = 0;
try {
- channel.start(channel.SND_RX_SEQ);
- channel.start(channel.MBR_RX_SEQ);
+ 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);
+ channel.start(Channel.MBR_RX_SEQ);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,1);
- channel.stop(channel.DEFAULT);
+ channel.stop(Channel.DEFAULT);
//double the membership sender
count = 0;
try {
- channel.start(channel.SND_RX_SEQ);
- channel.start(channel.MBR_TX_SEQ);
+ 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);
+ channel.start(Channel.MBR_TX_SEQ);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,1);
- channel.stop(channel.DEFAULT);
+ channel.stop(Channel.DEFAULT);
count = 0;
try {
- channel.start(channel.SND_RX_SEQ);
+ channel.start(Channel.SND_RX_SEQ);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
- channel.start(channel.SND_RX_SEQ);
+ channel.start(Channel.SND_RX_SEQ);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,1);
- channel.stop(channel.DEFAULT);
+ channel.stop(Channel.DEFAULT);
count = 0;
try {
- channel.start(channel.SND_TX_SEQ);
+ channel.start(Channel.SND_TX_SEQ);
count++;
} catch ( Exception x){x.printStackTrace();}
try {
- channel.start(channel.SND_TX_SEQ);
+ channel.start(Channel.SND_TX_SEQ);
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,1);
- channel.stop(channel.DEFAULT);
+ channel.stop(Channel.DEFAULT);
}
@Test
@@ -129,7 +130,7 @@ public class TestGroupChannelStartStop {
count++;
} catch ( Exception x){/*expected*/}
assertEquals(count,2);
- channel.stop(channel.DEFAULT);
+ channel.stop(Channel.DEFAULT);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]