diff options
author | Neil Fuller <nfuller@google.com> | 2014-05-21 09:09:06 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-05-21 09:09:06 +0000 |
commit | 49c2fa00ff36308903f8021c56e608325f8c21ee (patch) | |
tree | 90ff06107f61f6b551ae4e21489eb33993184c9d /luni | |
parent | 8e34bfb3d94388670de3d2be5bc575508d309e86 (diff) | |
parent | 6cc167354969859a27919a8d7f546cb4bd74d51e (diff) | |
download | libcore-49c2fa00ff36308903f8021c56e608325f8c21ee.zip libcore-49c2fa00ff36308903f8021c56e608325f8c21ee.tar.gz libcore-49c2fa00ff36308903f8021c56e608325f8c21ee.tar.bz2 |
Merge "Deprecate use of BrokenTest and SideEffect"
Diffstat (limited to 'luni')
13 files changed, 16 insertions, 31 deletions
diff --git a/luni/src/test/java/libcore/java/net/OldURLClassLoaderTest.java b/luni/src/test/java/libcore/java/net/OldURLClassLoaderTest.java index 3a40018..c076f1d 100644 --- a/luni/src/test/java/libcore/java/net/OldURLClassLoaderTest.java +++ b/luni/src/test/java/libcore/java/net/OldURLClassLoaderTest.java @@ -17,7 +17,6 @@ package libcore.java.net; -import dalvik.annotation.SideEffect; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -193,7 +192,7 @@ public class OldURLClassLoaderTest extends junit.framework.TestCase { } } - @SideEffect("Support_TestWebServer requires isolation.") + // SideEffect: Support_TestWebServer requires isolation. public void test_findResourceLjava_lang_String() throws Exception { File tmp = File.createTempFile("test", ".txt"); @@ -218,7 +217,7 @@ public class OldURLClassLoaderTest extends junit.framework.TestCase { /** * Regression for Harmony-2237 */ - @SideEffect("Support_TestWebServer requires isolation.") + // SideEffect: Support_TestWebServer requires isolation. public void test_findResource_String() throws Exception { File tempFile1 = File.createTempFile("textFile", ".txt"); tempFile1.createNewFile(); diff --git a/luni/src/test/java/libcore/java/nio/channels/OldSocketChannelTest.java b/luni/src/test/java/libcore/java/nio/channels/OldSocketChannelTest.java index 0d0c69f..f849c33 100644 --- a/luni/src/test/java/libcore/java/nio/channels/OldSocketChannelTest.java +++ b/luni/src/test/java/libcore/java/nio/channels/OldSocketChannelTest.java @@ -17,7 +17,6 @@ package libcore.java.nio.channels; -import dalvik.annotation.BrokenTest; import java.io.IOException; import java.net.InetSocketAddress; import java.net.ServerSocket; @@ -235,7 +234,7 @@ public class OldSocketChannelTest extends TestCase { return connected; } - @BrokenTest("Occasionally fail in CTS, but works in CoreTestRunner") + // Broken Test: 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); diff --git a/luni/src/test/java/libcore/java/security/OldDHTest.java b/luni/src/test/java/libcore/java/security/OldDHTest.java index 421d153..58d96ed 100644 --- a/luni/src/test/java/libcore/java/security/OldDHTest.java +++ b/luni/src/test/java/libcore/java/security/OldDHTest.java @@ -15,7 +15,6 @@ */ package libcore.java.security; -import dalvik.annotation.BrokenTest; import java.security.AlgorithmParameterGenerator; import java.security.AlgorithmParameters; import java.security.KeyPair; @@ -27,7 +26,7 @@ import junit.framework.TestCase; public class OldDHTest extends TestCase { - @BrokenTest("Suffers from DH slowness, disabling for now") + // BrokenTest Suffers from DH slowness, disabling for now public void testDHGen() throws Exception { KeyPairGenerator gen = null; try { diff --git a/luni/src/test/java/libcore/java/security/OldKeyPairGeneratorTestDH.java b/luni/src/test/java/libcore/java/security/OldKeyPairGeneratorTestDH.java index f39705b..9be282d 100644 --- a/luni/src/test/java/libcore/java/security/OldKeyPairGeneratorTestDH.java +++ b/luni/src/test/java/libcore/java/security/OldKeyPairGeneratorTestDH.java @@ -15,7 +15,6 @@ */ package libcore.java.security; -import dalvik.annotation.BrokenTest; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; @@ -24,7 +23,7 @@ import tests.security.KeyAgreementHelper; public class OldKeyPairGeneratorTestDH extends TestCase { - @BrokenTest("Takes ages due to DH computations. Disabling for now.") + // Broken Test: Takes ages due to DH computations. Disabling for now. public void testKeyPairGenerator() throws NoSuchAlgorithmException { KeyPairGenerator generator = KeyPairGenerator.getInstance("DH"); diff --git a/luni/src/test/java/libcore/java/security/cert/OldPKIXParametersTest.java b/luni/src/test/java/libcore/java/security/cert/OldPKIXParametersTest.java index d69e0e2..0832dae 100644 --- a/luni/src/test/java/libcore/java/security/cert/OldPKIXParametersTest.java +++ b/luni/src/test/java/libcore/java/security/cert/OldPKIXParametersTest.java @@ -22,7 +22,6 @@ package libcore.java.security.cert; -import dalvik.annotation.BrokenTest; import java.io.ByteArrayInputStream; import java.security.InvalidAlgorithmParameterException; import java.security.KeyStore; @@ -176,7 +175,7 @@ public class OldPKIXParametersTest extends TestCase { * @throws InvalidAlgorithmParameterException * @throws KeyStoreException */ - @BrokenTest("Fails in CTS environment, but passes in CoreTestRunner") + // Broken Test: Fails in CTS environment, but passes in CoreTestRunner public final void testPKIXParametersKeyStore04() throws Exception { diff --git a/luni/src/test/java/libcore/java/text/OldNumberFormatTest.java b/luni/src/test/java/libcore/java/text/OldNumberFormatTest.java index 356d0a9..d281a91 100644 --- a/luni/src/test/java/libcore/java/text/OldNumberFormatTest.java +++ b/luni/src/test/java/libcore/java/text/OldNumberFormatTest.java @@ -16,7 +16,6 @@ */ package libcore.java.text; -import dalvik.annotation.BrokenTest; import java.text.ChoiceFormat; import java.text.DecimalFormat; import java.text.FieldPosition; @@ -733,7 +732,7 @@ public class OldNumberFormatTest extends TestCase { + " instead of Integer.MIN_VALUE", result == 0); } - @BrokenTest("Fails in CTS, passes in CoreTestRunner") + // Broken Test: Fails in CTS, passes in CoreTestRunner public void test_parseLjava_lang_String() { NumberFormat nf1 = NumberFormat.getInstance(); try { diff --git a/luni/src/test/java/libcore/javax/crypto/spec/AlgorithmParameterGeneratorTestDH.java b/luni/src/test/java/libcore/javax/crypto/spec/AlgorithmParameterGeneratorTestDH.java index 578ee6b..e64fb9e 100644 --- a/luni/src/test/java/libcore/javax/crypto/spec/AlgorithmParameterGeneratorTestDH.java +++ b/luni/src/test/java/libcore/javax/crypto/spec/AlgorithmParameterGeneratorTestDH.java @@ -26,7 +26,7 @@ public class AlgorithmParameterGeneratorTestDH extends super("DH", new AlgorithmParameterKeyAgreementHelper("DH")); } - @BrokenTest("Suffers from DH slowness, disabling for now") + // Broken Test: Suffers from DH slowness, disabling for now public void testAlgorithmParameterGenerator() { super.testAlgorithmParameterGenerator(); } diff --git a/luni/src/test/java/libcore/javax/crypto/spec/AlgorithmParametersTestDH.java b/luni/src/test/java/libcore/javax/crypto/spec/AlgorithmParametersTestDH.java index 165daa1..897e62b 100644 --- a/luni/src/test/java/libcore/javax/crypto/spec/AlgorithmParametersTestDH.java +++ b/luni/src/test/java/libcore/javax/crypto/spec/AlgorithmParametersTestDH.java @@ -15,7 +15,6 @@ */ package libcore.javax.crypto.spec; -import dalvik.annotation.BrokenTest; import java.math.BigInteger; import javax.crypto.spec.DHParameterSpec; import tests.security.AlgorithmParameterKeyAgreementHelper; @@ -61,7 +60,7 @@ public class AlgorithmParametersTestDH extends AlgorithmParametersTest { } - @BrokenTest("Suffers from DH slowness, disabling for now") + // Broken Test: Suffers from DH slowness, disabling for now public void testAlgorithmParameters() { super.testAlgorithmParameters(); } diff --git a/luni/src/test/java/libcore/javax/crypto/spec/KeyPairGeneratorTestDH.java b/luni/src/test/java/libcore/javax/crypto/spec/KeyPairGeneratorTestDH.java index c4322ff..8e500e1 100644 --- a/luni/src/test/java/libcore/javax/crypto/spec/KeyPairGeneratorTestDH.java +++ b/luni/src/test/java/libcore/javax/crypto/spec/KeyPairGeneratorTestDH.java @@ -15,7 +15,6 @@ */ package libcore.javax.crypto.spec; -import dalvik.annotation.BrokenTest; import java.security.NoSuchAlgorithmException; import tests.security.KeyAgreementHelper; import tests.security.KeyPairGeneratorTest; @@ -26,7 +25,7 @@ public class KeyPairGeneratorTestDH extends KeyPairGeneratorTest { super("DH", new KeyAgreementHelper("DH")); } - @BrokenTest("Takes ages due to DH computations. Disabling for now.") + // Broken Test: Takes ages due to DH computations. Disabling for now. public void testKeyPairGenerator() throws NoSuchAlgorithmException { super.testKeyPairGenerator(); } diff --git a/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismTest.java b/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismTest.java index f617adb..87b2913 100644 --- a/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismTest.java +++ b/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismTest.java @@ -17,8 +17,6 @@ package org.apache.harmony.crypto.tests.javax.crypto; -import dalvik.annotation.SideEffect; - import java.math.BigInteger; import java.security.AlgorithmParameters; import java.security.InvalidAlgorithmParameterException; @@ -186,7 +184,7 @@ public class ExemptionMechanismTest extends TestCase { } } - @SideEffect("Causes OutOfMemoryError to test finalization") + // Side Effect: Causes OutOfMemoryError to test finalization public void test_finalize () { Mock_ExemptionMechanism mem = new Mock_ExemptionMechanism(null, null, "Name"); assertNotNull(mem); 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 5d8c621..290ae9a 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,8 +17,6 @@ package org.apache.harmony.luni.tests.internal.net.www.protocol.http; -import dalvik.annotation.SideEffect; - import java.io.IOException; import java.net.Authenticator; import java.net.HttpURLConnection; @@ -270,7 +268,7 @@ public class HttpURLConnectionTest extends TestCase { ProxySelector.setDefault(defPS); } } - @SideEffect("Suffers from side effect of other, currently unknown test") + // 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/net/ContentHandlerFactoryTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/ContentHandlerFactoryTest.java index 74b2276..f3d5518 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/ContentHandlerFactoryTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/ContentHandlerFactoryTest.java @@ -1,7 +1,5 @@ package org.apache.harmony.luni.tests.java.net; -import dalvik.annotation.SideEffect; - import junit.framework.TestCase; import tests.support.Support_Configuration; @@ -24,9 +22,9 @@ public class ContentHandlerFactoryTest extends TestCase { boolean isGetContentCalled = false; boolean isCreateContentHandlerCalled = false; - @SideEffect("This test affects tests that are run after this one." + - " The reason are side effects due to caching in URLConnection." + - " Maybe this test needs to be run in isolation.") + // SideEffect: This test affects tests that are run after this one. + // The reason are side effects due to caching in URLConnection. + // Maybe this test needs to be run in isolation. public void test_createContentHandler() throws IOException { TestContentHandlerFactory factory = new TestContentHandlerFactory(); diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java index e2a3a47..d3da174 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java @@ -16,7 +16,6 @@ package org.apache.harmony.luni.tests.java.net; -import dalvik.annotation.BrokenTest; import junit.framework.TestCase; import tests.support.Support_Configuration; import tests.support.Support_TestWebData; @@ -442,7 +441,7 @@ public class URLConnectionTest extends TestCase { * @throws IOException * {@link java.net.URLConnection#getContentEncoding()} */ - @BrokenTest("Fails in CTS, passes in CoreTestRunner") + // broken test - Fails in CTS, passes in CoreTestRunner public void test_getContentEncoding() throws IOException { // faulty setup try { |