summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorJorg Pleumann <>2009-04-28 21:53:12 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-28 21:53:12 -0700
commit4e1681e5ba683c53443b6412b83caae8e8fc02e5 (patch)
tree877c6f8bd86d2e5695a3b80480e0b98ae3b7a6d2 /luni
parentff76528cdecbaef60cc6d7e4dc845b7146f23fe6 (diff)
parent1a7e762f344c111416b001a61e41451d01f605ad (diff)
downloadlibcore-4e1681e5ba683c53443b6412b83caae8e8fc02e5.zip
libcore-4e1681e5ba683c53443b6412b83caae8e8fc02e5.tar.gz
libcore-4e1681e5ba683c53443b6412b83caae8e8fc02e5.tar.bz2
am ef71222: AI 147838: A couple of fixes for making the
Merge commit 'ef7122278207e33b724c6360945f9eae1f9a5a58' into donut * commit 'ef7122278207e33b724c6360945f9eae1f9a5a58': AI 147838: A couple of fixes for making the
Diffstat (limited to 'luni')
-rw-r--r--luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java2
-rw-r--r--luni/src/test/java/org/apache/harmony/luni/tests/java/lang/String2Test.java2
-rw-r--r--luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java4
-rw-r--r--luni/src/test/java/tests/api/java/net/URLStreamHandlerFactoryTest.java16
-rw-r--r--luni/src/test/java/tests/api/java/util/CalendarTest.java3
5 files changed, 17 insertions, 10 deletions
diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
index 8abfa1d..d517e07 100644
--- a/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
+++ b/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
@@ -17,6 +17,7 @@
package org.apache.harmony.luni.tests.internal.net.www.protocol.http;
+import dalvik.annotation.SideEffect;
import dalvik.annotation.BrokenTest;
import dalvik.annotation.KnownFailure;
import dalvik.annotation.TestTargetClass;
@@ -304,6 +305,7 @@ public class HttpURLConnectionTest extends TestCase {
args = {}
)
})
+ @SideEffect("Suffers from side effect of other, currently unknown test")
public void testProxyAuthorization() throws Exception {
// Set up test Authenticator
Authenticator.setDefault(new Authenticator() {
diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/String2Test.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/String2Test.java
index c151caf..972ab03 100644
--- a/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/String2Test.java
+++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/String2Test.java
@@ -17,6 +17,7 @@
package org.apache.harmony.luni.tests.java.lang;
+import dalvik.annotation.BrokenTest;
import dalvik.annotation.TestTargets;
import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetNew;
@@ -528,6 +529,7 @@ public class String2Test extends junit.framework.TestCase {
method = "getBytes",
args = {}
)
+ @BrokenTest("Takes too long for the CTS host")
public void test_getBytes() {
// Test for method byte [] java.lang.String.getBytes()
byte[] sbytes = hw1.getBytes();
diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
index 1cfb1cb..1f1456f 100644
--- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
+++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
@@ -17,6 +17,7 @@
package org.apache.harmony.luni.tests.java.net;
+import dalvik.annotation.BrokenTest;
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargets;
import dalvik.annotation.TestLevel;
@@ -354,6 +355,7 @@ public class InetAddressTest extends junit.framework.TestCase {
method = "getHostName",
args = {}
)
+ @BrokenTest("Crashes VM in CTS due to a JNI error in networking code")
public void test_getHostName() throws Exception {
// Test for method java.lang.String java.net.InetAddress.getHostName()
InetAddress ia = InetAddress
@@ -633,6 +635,8 @@ public class InetAddressTest extends junit.framework.TestCase {
method = "isReachable",
args = {java.net.NetworkInterface.class, int.class, int.class}
)
+ @BrokenTest("Depends on external network address and shows different" +
+ "behavior with WLAN and 3G networks")
public void test_isReachableLjava_net_NetworkInterfaceII() throws Exception {
// tests local address
InetAddress ia = Inet4Address.getByName("127.0.0.1");
diff --git a/luni/src/test/java/tests/api/java/net/URLStreamHandlerFactoryTest.java b/luni/src/test/java/tests/api/java/net/URLStreamHandlerFactoryTest.java
index 7f4d735..ddfa473 100644
--- a/luni/src/test/java/tests/api/java/net/URLStreamHandlerFactoryTest.java
+++ b/luni/src/test/java/tests/api/java/net/URLStreamHandlerFactoryTest.java
@@ -1,13 +1,5 @@
package tests.api.java.net;
-import dalvik.annotation.TestLevel;
-import dalvik.annotation.TestTargetClass;
-import dalvik.annotation.TestTargetNew;
-
-import junit.framework.TestCase;
-
-import tests.support.Support_Configuration;
-
import java.io.IOException;
import java.lang.reflect.Field;
import java.net.MalformedURLException;
@@ -16,6 +8,13 @@ import java.net.URLConnection;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
+import junit.framework.TestCase;
+import tests.support.Support_Configuration;
+import dalvik.annotation.SideEffect;
+import dalvik.annotation.TestLevel;
+import dalvik.annotation.TestTargetClass;
+import dalvik.annotation.TestTargetNew;
+
@TestTargetClass(URLStreamHandlerFactory.class)
public class URLStreamHandlerFactoryTest extends TestCase {
@@ -33,6 +32,7 @@ public class URLStreamHandlerFactoryTest extends TestCase {
method = "createURLStreamHandler",
args = {java.lang.String.class}
)
+ @SideEffect("Leaves wrong StreamHandlerFactory behind, affects other tests")
public void test_createURLStreamHandler() throws MalformedURLException {
if(isTestable) {
diff --git a/luni/src/test/java/tests/api/java/util/CalendarTest.java b/luni/src/test/java/tests/api/java/util/CalendarTest.java
index a3c003f..af43096 100644
--- a/luni/src/test/java/tests/api/java/util/CalendarTest.java
+++ b/luni/src/test/java/tests/api/java/util/CalendarTest.java
@@ -1283,8 +1283,7 @@ public class CalendarTest extends junit.framework.TestCase {
args = {int.class}
)
public void test_EdgeCases() {
- Locale.setDefault(Locale.US);
- Calendar c = Calendar.getInstance();
+ Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
c.setTimeInMillis(Long.MAX_VALUE);