tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r988562 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/ test/ test/src/share/org/apache/catalina/cluster/session/ test/src/share/org/apache/catalina/cluster/tcp/
Date Tue, 24 Aug 2010 14:29:12 GMT
Author: rjung
Date: Tue Aug 24 14:29:12 2010
New Revision: 988562

URL: http://svn.apache.org/viewvc?rev=988562&view=rev
Log:
Fix broken unit tests.

Modified:
    tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
    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/ReplicationTransmitterTest.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=988562&r1=988561&r2=988562&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Tue Aug 24 14:29:12 2010
@@ -32,6 +32,9 @@
 <section name="Tomcat OACC 0.1 (rjung)">
   <subsection name="Cluster">
       <fix>
+        Fix broken unit tests. (rjung)
+      </fix>
+      <fix>
         Add Null check when CHANGE_SESSION_ID message received. (rjung)
       </fix>
       <fix>

Modified: tomcat/sandbox/tomcat-oacc/trunk/test/build.xml
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/test/build.xml?rev=988562&r1=988561&r2=988562&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-oacc/trunk/test/build.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/test/build.xml Tue Aug 24 14:29:12 2010
@@ -39,6 +39,7 @@
        <pathelement location="${catalina.home}/lib/servlet-api.jar"/>
        <pathelement location="${oacc.dist.dir}/lib/apache-tomcat-oacc.jar"/>
        <pathelement location="${oacc.dist.dir}/lib/apache-tomcat-sso.jar"/>
+       <pathelement location="${junit.jar}" />
     </path>
 
 

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=988562&r1=988561&r2=988562&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
Tue Aug 24 14:29:12 2010
@@ -39,6 +39,7 @@ public class DeltaManagerTest extends Te
 
     public void testCreateSession() {
         MockDeltaManager manager = new MockDeltaManager() ;
+        manager.setContainer(new StandardContext());
         Session session = manager.createSession(null,false);
         assertNotNull(session.getId());
         assertEquals(32, session.getId().length());

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=988562&r1=988561&r2=988562&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
Tue Aug 24 14:29:12 2010
@@ -20,6 +20,7 @@ package org.apache.catalina.cluster.sess
 import junit.framework.TestCase;
 
 import org.apache.catalina.Manager;
+import org.apache.catalina.core.StandardContext;
 
 /**
  * @author Peter Rossbach
@@ -30,6 +31,7 @@ public class DeltaSessionTest extends Te
 
     public void testPrimarySessionisValid() {
         DeltaManager manager = new DeltaManager() { public DeltaSession getNewDeltaSession()
{ return new MockSession(this) ; } } ;
+        manager.setContainer(new StandardContext());
         manager.setMaxInactiveInterval(1);
         MockSession session = (MockSession)manager.createSession("hello",false);
         assertTrue(session.isPrimarySession());
@@ -50,6 +52,7 @@ public class DeltaSessionTest extends Te
  
     public void testBackupSessionisValid() {
         DeltaManager manager = new DeltaManager() { public DeltaSession getNewDeltaSession()
{ return new MockSession(this) ; } } ;
+        manager.setContainer(new StandardContext());
         manager.setMaxInactiveInterval(1);
         MockSession session = (MockSession)manager.createSession("hello",false);
         session.setPrimarySession(false);

Modified: tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitterTest.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitterTest.java?rev=988562&r1=988561&r2=988562&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitterTest.java
(original)
+++ tomcat/sandbox/tomcat-oacc/trunk/test/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitterTest.java
Tue Aug 24 14:29:12 2010
@@ -68,9 +68,10 @@ public class ReplicationTransmitterTest 
             length = gin.read(tmp);
         }
         gin.close();
+        ClassLoader[] cls = new ClassLoader[1];
+        cls[0] = getClass().getClassLoader();
         ReplicationStream stream = new ReplicationStream(
-                new java.io.ByteArrayInputStream(result), getClass()
-                        .getClassLoader());
+                new java.io.ByteArrayInputStream(result), cls);
         Object myobj = stream.readObject();
         return myobj;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message