harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chunrong lai <chunrong...@gmail.com>
Subject Re: [M9] Classlib test failures
Date Mon, 09 Mar 2009 09:28:00 GMT
Hmm. I see there is possibly missed proxy setting in the test case, the test
case can get passed in my testing environment if with below change (On the
other hand it may just pass if a proxy is not required).

---
luni/src/test/api/common/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
(revision
727027)
+++
luni/src/test/api/common/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
(working
copy)
@@ -33,6 +33,7 @@
 import java.net.URL;
 import java.security.Permission;
 import java.util.ArrayList;
+import java.util.Properties;

 import junit.framework.TestCase;

@@ -320,6 +321,9 @@
      * Test whether getOutputStream can work after connection
      */
     public void test_getOutputStream_AfterConnect() throws Exception {
+ Properties prop = System.getProperties();
+ prop.put("http.proxyHost","...........");
+ prop.put("http.proxyPort","...");
         URL url = new URL("http://www.apache.org");
         HttpURLConnection connection = (HttpURLConnection)
url.openConnection();
         connection.setDoOutput(true);
@@ -331,6 +335,8 @@
         connection.getOutputStream();
         String str_post = connection.getRequestMethod();
         assertTrue(str_post.equalsIgnoreCase("POST"));
+ prop.put("http.proxyHost","");
+ prop.put("http.proxyPort","");
     }

On Mon, Mar 9, 2009 at 5:04 PM, chunrong lai <chunronglai@gmail.com> wrote:

> I mainly investigated 3 errors:
> error  test_getHeaderFields
> org.apache.harmony.luni.tests.internal.net.www.protocol.http.HttpURLConnectionTest
>
> error  test_getOutputStream_AfterConnect
> org.apache.harmony.luni.tests.internal.net.www.protocol.http.HttpURLConnectionTest
>
> error  testUsingProxy2
> org.apache.harmony.luni.tests.internal.net.www.protocol.http.HttpURLConnectionTest
> (They all failed on 4 platforms in our Integrity Testing, and also failed
> on 2 platform in Snapshot Testing.)
>
> And I got following observations:
> 1. M8 did not have the 3 test cases at all.
>  (1). test_getHeaderFields and testUsingProxy2 were committed by r727252
> for HARMONY-6049.
>  (2). test_getOutputStream_AfterConnect was committed by r724594 for
> HARMONY-6012.
> 2. RI also failed on the 3 test cases.
>
>
>  On Thu, Mar 5, 2009 at 6:45 PM, Sian January <sianjanuary@googlemail.com>wrote:
>
>> According to the integrity page there are quite a few classlib test
>> failures.  For M8 we had no failures on Windows and only one on Linux
>> so I think it would be good to get these fixed for M9.  Does anyone
>> happen to know which commit caused the failures?
>>
>> Thanks,
>>
>> Sian
>>
>>
>> http://people.apache.org/~chunrong/harmony-integrity/
>>
>>
>> --
>> Unless stated otherwise above:
>> IBM United Kingdom Limited - Registered in England and Wales with number
>> 741598.
>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message