harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r995098 - /harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImplTest.java
Date Wed, 08 Sep 2010 15:35:25 GMT
Author: odeakin
Date: Wed Sep  8 15:35:25 2010
New Revision: 995098

URL: http://svn.apache.org/viewvc?rev=995098&view=rev
Log:
Reenable this test with some modifications to work on the new versions of the x-net classes.

Modified:
    harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImplTest.java

Modified: harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImplTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImplTest.java?rev=995098&r1=995097&r2=995098&view=diff
==============================================================================
--- harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImplTest.java
(original)
+++ harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImplTest.java
Wed Sep  8 15:35:25 2010
@@ -30,14 +30,21 @@ import junit.framework.TestCase;
  */
 public class SSLSessionContextImplTest extends TestCase {
 
-    public void testSSLSessionContextImpl() {
-        SecureRandom sr = new SecureRandom();
-        /*SSLSessionImpl ses1 = new SSLSessionImpl(
-                CipherSuite.TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA, sr);
+    public void testSSLSessionContextImpl() throws Exception {
+        SSLParameters parms = SSLParameters.getDefault();
+        SSLSocketImpl socket1 = new SSLSocketImpl(parms);
+        SSLSocketImpl socket2 = new SSLSocketImpl(parms);
+        SSLSocketImpl socket3 = new SSLSocketImpl(parms);
+
+        SSLSessionImpl ses1 = new SSLSessionImpl(
+                socket1, SSLParameters.getDefault(), 0);
+        ses1.id = new byte[] {0,1,2,3};
         SSLSessionImpl ses2 = new SSLSessionImpl(
-                CipherSuite.TLS_DH_anon_WITH_3DES_EDE_CBC_SHA, sr);
+                socket2, SSLParameters.getDefault(), 0);
+        ses1.id = new byte[] {0,1,2,4};
         SSLSessionImpl ses3 = new SSLSessionImpl(
-                CipherSuite.TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5, sr);
+                socket3, SSLParameters.getDefault(), 0);
+        ses1.id = new byte[] {0,1,2,5};
 
         SSLSessionContextImpl context = new SSLSessionContextImpl();
         context.putSession(ses1);
@@ -53,7 +60,7 @@ public class SSLSessionContextImplTest e
         assertSame(ses1, ses);
 
         ses = context.getSession(ses3.getId());
-        assertSame(ses3, ses);*/
+        assertSame(ses3, ses);
     }
 
     public void testGetSessionCacheSize() {



Mime
View raw message