summaryrefslogtreecommitdiffstats
path: root/tests/CoreTests
diff options
context:
space:
mode:
authorJorg Pleumann <nobody@android.com>2009-05-11 00:44:29 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-05-11 00:44:29 -0700
commit86dbf0d798e54c8e1f8d8a87ae7e85b206959dd5 (patch)
tree297bb12fbf98117f4ce395db988bebc846243de0 /tests/CoreTests
parent6b5c200025a21439eee388c27e34c9f2d25627f8 (diff)
parentb4735b6c04c6bca3219115395748a1b5ef02ff6c (diff)
downloadframeworks_base-86dbf0d798e54c8e1f8d8a87ae7e85b206959dd5.zip
frameworks_base-86dbf0d798e54c8e1f8d8a87ae7e85b206959dd5.tar.gz
frameworks_base-86dbf0d798e54c8e1f8d8a87ae7e85b206959dd5.tar.bz2
am b4735b6: am 25f9637: AI 148665: Disabling a test that does not work a
Merge commit 'b4735b6c04c6bca3219115395748a1b5ef02ff6c' * commit 'b4735b6c04c6bca3219115395748a1b5ef02ff6c': AI 148665: Disabling a test that does not work as
Diffstat (limited to 'tests/CoreTests')
-rw-r--r--tests/CoreTests/android/core/SocketTest.java52
1 files changed, 29 insertions, 23 deletions
diff --git a/tests/CoreTests/android/core/SocketTest.java b/tests/CoreTests/android/core/SocketTest.java
index b64c156..9db6077 100644
--- a/tests/CoreTests/android/core/SocketTest.java
+++ b/tests/CoreTests/android/core/SocketTest.java
@@ -178,29 +178,35 @@ public class SocketTest extends TestCase {
SocketChannel.open();
}
- // Regression test for issue 1018016, connecting ignored a set timeout.
- @LargeTest
- public void testSocketSetSOTimeout() throws IOException {
- Socket sock = new Socket();
- int timeout = 5000;
- long start = System.currentTimeMillis();
- try {
- sock.connect(new InetSocketAddress(NON_EXISTING_ADDRESS, 80), timeout);
- } catch (SocketTimeoutException e) {
- // expected
- long delay = System.currentTimeMillis() - start;
- if (Math.abs(delay - timeout) > 1000) {
- fail("timeout was not accurate. expected: " + timeout
- + " actual: " + delay + " miliseconds.");
- }
- } finally {
- try {
- sock.close();
- } catch (IOException ioe) {
- // ignore
- }
- }
- }
+// Regression test for issue 1018016, connecting ignored a set timeout.
+//
+// Disabled because test behaves differently depending on networking
+// environment. It works fine in the emulator and one the device with
+// WLAN, but when 3G comes into play, the possible existence of a
+// proxy makes it fail.
+//
+// @LargeTest
+// public void testSocketSetSOTimeout() throws IOException {
+// Socket sock = new Socket();
+// int timeout = 5000;
+// long start = System.currentTimeMillis();
+// try {
+// sock.connect(new InetSocketAddress(NON_EXISTING_ADDRESS, 80), timeout);
+// } catch (SocketTimeoutException e) {
+// // expected
+// long delay = System.currentTimeMillis() - start;
+// if (Math.abs(delay - timeout) > 1000) {
+// fail("timeout was not accurate. expected: " + timeout
+// + " actual: " + delay + " miliseconds.");
+// }
+// } finally {
+// try {
+// sock.close();
+// } catch (IOException ioe) {
+// // ignore
+// }
+// }
+// }
/**
* Regression test for 1062928: Dotted IP addresses (e.g., 192.168.100.1)