summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorJorg Pleumann <>2009-04-29 12:06:36 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-29 12:06:36 -0700
commitef1494301aa27935db7ed917ee1dcd1b3505332e (patch)
tree25bed2fcf5710b7a8fcb09016b844fe1813068fc /luni
parent0bc6f9d91c60da3377407b202124715f12444109 (diff)
parent4e1681e5ba683c53443b6412b83caae8e8fc02e5 (diff)
downloadlibcore-ef1494301aa27935db7ed917ee1dcd1b3505332e.zip
libcore-ef1494301aa27935db7ed917ee1dcd1b3505332e.tar.gz
libcore-ef1494301aa27935db7ed917ee1dcd1b3505332e.tar.bz2
am 8073bbc: am ef71222: AI 147838: A couple of fixes for making the
Merge commit '8073bbcc99d6a66f49497915ee12ce13f5b2ef85' * commit '8073bbcc99d6a66f49497915ee12ce13f5b2ef85': 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);