diff options
author | Kim Moir | 2012-01-26 16:51:54 +0000 |
---|---|---|
committer | Kim Moir | 2012-01-26 16:51:54 +0000 |
commit | 2ebe1f2dcfc66c1bb947c428cce6df473952bd47 (patch) | |
tree | 53714d94b4ce136428ea71fdaee52fe5e5739302 /org.eclipse.ua.tests/help/org | |
parent | 41b81d47d907ed2f6c918f99f9013778af3d81e7 (diff) | |
download | eclipse.platform.ua-2ebe1f2dcfc66c1bb947c428cce6df473952bd47.tar.gz eclipse.platform.ua-2ebe1f2dcfc66c1bb947c428cce6df473952bd47.tar.xz eclipse.platform.ua-2ebe1f2dcfc66c1bb947c428cce6df473952bd47.zip |
Bug 369828 - Test failures on JRE v20120126-1651
Diffstat (limited to 'org.eclipse.ua.tests/help/org')
-rw-r--r-- | org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/TocZipTest.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/TocZipTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/TocZipTest.java index ad1a32e80..7bf22b022 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/TocZipTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/TocZipTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 IBM Corporation and others. + * Copyright (c) 2011, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -17,6 +17,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; +import java.net.URLConnection; import junit.framework.TestCase; @@ -53,7 +54,10 @@ public class TocZipTest extends TestCase { IOException { int port = WebappManager.getPort(); URL url = new URL("http", "localhost", port, "/help/topic" + path); - InputStream is = url.openStream(); + URLConnection connection= url.openConnection(); + connection.setConnectTimeout(5000); + connection.setReadTimeout(5000); + InputStream is= connection.getInputStream(); BufferedInputStream buffered = new BufferedInputStream(is); ByteArrayOutputStream os = new ByteArrayOutputStream(); int result = buffered.read(); |