Author: pero
Date: Thu Mar 27 13:38:44 2008
New Revision: 641973
URL: http://svn.apache.org/viewvc?rev=641973&view=rev
Log:
reactivate test cases
Modified:
tomcat/sandbox/tomcat-oacc/trunk/test/build.xml
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaManagerTest.java
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaSessionTest.java
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java
Modified: tomcat/sandbox/tomcat-oacc/trunk/test/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/test/build.xml?rev=641973&r1=641972&r2=641973&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-oacc/trunk/test/build.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/test/build.xml Thu Mar 27 13:38:44 2008
@@ -17,36 +17,31 @@
-->
<!-- @author Peter Rossbach -->
<project name="Tomcat: Cluster Testcases" basedir="." default="test">
- <property file="../../../../build/build.properties" />
- <property file="../../../../build/build.properties.default" />
+ <property file="../build.properties" />
+ <property file="../build.properties.default" />
<property name="test.report.logs" value="logs/reports" />
<property name="test.results" value="logs/test-results" />
<property name="compile.optimize" value="true" />
<property name="compile.debug" value="true" />
- <property name="compile.source" value="1.4" />
+ <property name="compile.source" value="1.5" />
<property name="compile.deprecation" value="true" />
<property name="compile.nowarn" value="off" />
- <property name="compile.encoding" value="ISO-8859-1" />
+ <property name="compile.encoding" value="UTF-8" />
<property name="build.dir" value="build/test" />
<property name="src.dir" value="src/share" />
- <property name="catalina.home" value="../../../../build/build" />
+ <property name="oacc.dist" value="../dist" />
<!-- Build the classpath -->
- <path id="project.classpath">
- <pathelement location="${jmx.jar}" />
- <pathelement location="${commons-logging.jar}" />
- <pathelement location="${log4j.jar}" />
- <fileset dir="${catalina.home}/common/endorsed">
- <include name="*.jar" />
- </fileset>
- <fileset dir="${catalina.home}/common/lib">
- <include name="*.jar" />
- </fileset>
- <fileset dir="${catalina.home}/server/lib">
- <include name="*.jar" />
- </fileset>
- </path>
+ <path id="oacc.classpath">
+ <pathelement location="${catalina.home}/lib/catalina.jar"/>
+ <pathelement location="${catalina.home}/lib/tomcat-coyote.jar"/>
+ <pathelement location="${catalina.extras}/tomcat-juli.jar"/>
+ <pathelement location="${catalina.home}/lib/servlet-api.jar"/>
+ <pathelement location="${oacc.dist}/lib/catalina-oacc.jar"/>
+ <pathelement location="${oacc.dist}/lib/catalina-sso.jar"/>
+ </path>
+
<target name="build-prepare">
<mkdir dir="${build.dir}" />
@@ -75,7 +70,7 @@
<!-- Compiles all sources -->
<javac destdir="${build.dir}/classes" srcdir="${src.dir}"
includes="**/*.java" excludes="**/CVS/**" deprecation="${compile.deprecation}"
debug="${compile.debug}" source="${compile.source}"
optimize="${compile.optimize}" nowarn="${compile.nowarn}"
encoding="${compile.encoding}">
<classpath>
- <path refid="project.classpath" />
+ <path refid="oacc.classpath" />
</classpath>
</javac>
</target>
@@ -83,13 +78,16 @@
<target name="test" depends="compile" description="Run unit tests">
<delete dir="${test.results}" />
<mkdir dir="${test.results}" />
+ <echo>#### Some tests logging Warnings or Errors, but this is
OK!
+ -------------------------------------------------------------------
+ </echo>
<junit fork="yes" failureProperty="test.failure">
<jvmarg value="-Dcatalina.base=${basedir}" />
<jvmarg value="-Dcatalina.home=${catalina.home}" />
- <jvmarg
value="-Dlog4j.configuration=file:conf/log4j.xml" />
+ <jvmarg
value="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" />
<classpath>
<pathelement location="${build.dir}/classes" />
- <path refid="project.classpath" />
+ <path refid="oacc.classpath" />
</classpath>
<formatter type="plain" usefile="false" />
<formatter type="xml" />
Modified:
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaManagerTest.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaManagerTest.java?rev=641973&r1=641972&r2=641973&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaManagerTest.java
(original)
+++
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaManagerTest.java
Thu Mar 27 13:38:44 2008
@@ -23,6 +23,7 @@
import junit.framework.TestCase;
import org.apache.catalina.Session;
+import org.apache.catalina.core.StandardContext;
import org.apache.catalina.cluster.ClusterMessage;
import org.apache.catalina.cluster.Member;
import org.apache.catalina.cluster.mcast.McastMember;
@@ -48,6 +49,7 @@
public void testhandleGET_ALL_SESSIONS() throws Exception {
MockDeltaManager manager = new MockDeltaManager() ;
+ manager.setContainer(new StandardContext());
Session session = manager.createSession(null,false);
assertEquals(session, manager.findSession(session.getId()));
for (int i = 0; i < 10; i++) {
Modified:
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaSessionTest.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaSessionTest.java?rev=641973&r1=641972&r2=641973&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaSessionTest.java
(original)
+++
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/session/DeltaSessionTest.java
Thu Mar 27 13:38:44 2008
@@ -53,6 +53,7 @@
manager.setMaxInactiveInterval(1);
MockSession session =
(MockSession)manager.createSession("hello",false);
session.setPrimarySession(false);
+ session.setExpireTolerance(1);
try {
Thread.sleep(1000);
} catch (Exception sleep) {
Modified:
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java?rev=641973&r1=641972&r2=641973&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java
(original)
+++
tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java
Thu Mar 27 13:38:44 2008
@@ -240,6 +240,7 @@
InetAddress host = InetAddress.getByName("127.0.0.1");
DataSender sender = new MockDataSender("catalina",host, 3434);
sender.openSocket() ;
+ sender.setResend(false);
((MockSocket)sender.getSocket()).setWriteIOException(true);
try {
assertPushMessage(sender);
@@ -409,6 +410,7 @@
* @see java.net.Socket#getOutputStream()
*/
public OutputStream getOutputStream() throws IOException {
+ System.out.println("getOutputString " + isWriteIOException());
if(isWriteIOException()) {
throw new IOException("MockSocket");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]