Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 136008 Details for
Bug 276457
Install fails without a trace using I20090514-2000.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Regression test
patch.txt (text/plain), 2.40 KB, created by
John Arthorne
on 2009-05-15 11:02:34 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2009-05-15 11:02:34 EDT
Size:
2.40 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.tests >Index: src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java,v >retrieving revision 1.1 >diff -u -r1.1 FileReaderTest.java >--- src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java 12 May 2009 00:32:22 -0000 1.1 >+++ src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java 15 May 2009 15:03:31 -0000 >@@ -11,11 +11,9 @@ > > package org.eclipse.equinox.p2.tests.repository; > >-import java.io.ByteArrayOutputStream; >-import java.io.OutputStream; >+import java.io.*; > import java.net.*; >-import org.eclipse.core.runtime.IStatus; >-import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.*; > import org.eclipse.equinox.internal.p2.repository.RepositoryTransport; > import org.eclipse.equinox.p2.tests.testserver.helper.AbstractTestServerClientCase; > >@@ -44,6 +42,30 @@ > assertTrue("Should be a connect exception", status.getException() instanceof ConnectException); > assertTrue("Should begin with 'Connection refused'", status.getException().getMessage().startsWith("Connection refused")); > } >+ >+ /** >+ * Tests a successful read. >+ */ >+ public void testReadStream() throws URISyntaxException, CoreException, IOException { >+ RepositoryTransport transport = RepositoryTransport.getInstance(); >+ URI toDownload = new URI("http://localhost:8080/public/index.html"); >+ final NullProgressMonitor monitor = new NullProgressMonitor(); >+ InputStream stream = transport.stream(toDownload, monitor); >+ stream.close(); >+ assertFalse("1.0", monitor.isCanceled()); >+ } >+ >+ /** >+ * Tests a successful read. >+ */ >+ public void testRead() throws URISyntaxException, CoreException, IOException { >+ RepositoryTransport transport = RepositoryTransport.getInstance(); >+ URI toDownload = new URI("http://localhost:8080/public/index.html"); >+ OutputStream target = new ByteArrayOutputStream(); >+ final NullProgressMonitor monitor = new NullProgressMonitor(); >+ IStatus result = transport.download(toDownload, target, monitor); >+ assertTrue("1.0", result.isOK()); >+ } > // TODO: test > // timeout, cancel of timeout (TimeoutTest) > // bad date returned, very old, and in the future
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276457
:
136000
| 136008