OSDN Git Service

AI 148670: More tests that need to be marked broken, since
authorJorg Pleumann <nobody@android.com>
Mon, 11 May 2009 17:10:42 +0000 (10:10 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Mon, 11 May 2009 17:10:42 +0000 (10:10 -0700)
  they behave differently in CTS and plain VM.
  Hopefully the last ones...
  BUG=1285921

Automated import of CL 148670

libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
libcore/luni/src/test/java/tests/api/java/util/TimeZoneTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java
libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/NumberFormatTest.java

index 968a056..a655c4f 100644 (file)
@@ -21,6 +21,7 @@ import dalvik.annotation.TestTargetNew;
 import dalvik.annotation.TestTargets;
 import dalvik.annotation.TestLevel;
 import dalvik.annotation.TestTargetClass;
+import dalvik.annotation.BrokenTest;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -128,6 +129,7 @@ public class HttpURLConnectionTest extends junit.framework.TestCase {
       method = "getHeaderFields",
       args = {}
     )
+    @BrokenTest("Fails in CTS, passes in CoreTestRunner")
     public void test_getHeaderFields() throws Exception {
         url = new URL("http://" + Support_Configuration.testURL);
         uc = (HttpURLConnection) url.openConnection();
index 08e90bd..c803d3b 100644 (file)
@@ -16,6 +16,7 @@
 
 package org.apache.harmony.luni.tests.java.net;
 
+import dalvik.annotation.BrokenTest;
 import dalvik.annotation.KnownFailure;
 import dalvik.annotation.TestLevel;
 import dalvik.annotation.TestTargetClass;
@@ -672,6 +673,7 @@ public class URLConnectionTest extends TestCase {
         method = "getContentEncoding",
         args = {}
     )
+    @BrokenTest("Fails in CTS, passes in CoreTestRunner")
     public void test_getContentEncoding() throws IOException {
         // faulty setup
         try {
index 891e9b8..efdb8a1 100644 (file)
@@ -17,6 +17,7 @@
 
 package tests.api.java.util;
 
+import dalvik.annotation.BrokenTest;
 import dalvik.annotation.TestTargetNew;
 import dalvik.annotation.TestTargets;
 import dalvik.annotation.TestLevel;
@@ -195,6 +196,7 @@ public class TimeZoneTest extends junit.framework.TestCase {
         method = "setDefault",
         args = {java.util.TimeZone.class}
     )
+    @BrokenTest("Runner sets timezone before test, hence old value != default")
     public void test_setDefaultLjava_util_TimeZone() {
         TimeZone oldDefault = TimeZone.getDefault();
         TimeZone zone = new SimpleTimeZone(45, "TEST");
index 069623d..b7a1012 100755 (executable)
@@ -22,6 +22,7 @@ import dalvik.annotation.TestTargetNew;
 import dalvik.annotation.TestTargetClass;
 import dalvik.annotation.TestLevel;
 import dalvik.annotation.AndroidOnly;
+import dalvik.annotation.BrokenTest;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -2669,6 +2670,7 @@ public class SocketChannelTest extends TestCase {
         method = "write",
         args = {java.nio.ByteBuffer.class}
     )
+    @BrokenTest("Occasionally fail in CTS, but works in CoreTestRunner")
     public void test_writeLjava_nio_ByteBuffer_Nonblocking_HugeData() throws IOException {
         // initialize write content
         ByteBuffer writeContent = ByteBuffer.allocate(CAPACITY_HUGE);
index c047d3e..93e58db 100644 (file)
@@ -21,6 +21,7 @@ import dalvik.annotation.TestTargets;
 import dalvik.annotation.TestLevel;
 import dalvik.annotation.TestTargetNew;
 import dalvik.annotation.TestTargetClass;
+import dalvik.annotation.BrokenTest;
 
 import junit.framework.TestCase;
 
@@ -1298,6 +1299,7 @@ public class NumberFormatTest extends TestCase {
         method = "parse",
         args = {java.lang.String.class}
     )
+    @BrokenTest("Fails in CTS, passes in CoreTestRunner")
     public void test_parseLjava_lang_String() {
         NumberFormat nf1 = NumberFormat.getInstance();
         try {