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 120183 Details for
Bug 252060
InputStream from HostShellProcessAdapter incorrectly throws IOException
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]
junit test for this bug
brokenPipeJUnitTest.diff (text/plain), 2.43 KB, created by
Anna Dushistova
on 2008-12-11 07:07:33 EST
(
hide
)
Description:
junit test for this bug
Filename:
MIME Type:
Creator:
Anna Dushistova
Created:
2008-12-11 07:07:33 EST
Size:
2.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.tests >Index: src/org/eclipse/rse/tests/subsystems/shells/ShellServiceTest.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellServiceTest.java,v >retrieving revision 1.3 >diff -u -r1.3 ShellServiceTest.java >--- src/org/eclipse/rse/tests/subsystems/shells/ShellServiceTest.java 4 Dec 2008 22:20:01 -0000 1.3 >+++ src/org/eclipse/rse/tests/subsystems/shells/ShellServiceTest.java 11 Dec 2008 12:05:41 -0000 >@@ -11,6 +11,9 @@ > *******************************************************************************/ > package org.eclipse.rse.tests.subsystems.shells; > >+import java.io.BufferedReader; >+import java.io.IOException; >+import java.io.InputStreamReader; > import java.lang.reflect.Method; > > import junit.framework.Test; >@@ -22,6 +25,7 @@ > import org.eclipse.rse.core.model.IHost; > import org.eclipse.rse.core.subsystems.ISubSystem; > import org.eclipse.rse.services.clientserver.messages.SystemMessageException; >+import org.eclipse.rse.services.shells.HostShellProcessAdapter; > import org.eclipse.rse.services.shells.IHostOutput; > import org.eclipse.rse.services.shells.IHostShell; > import org.eclipse.rse.services.shells.IShellService; >@@ -73,6 +77,7 @@ > > // // Add a test suite for each connection type > String[] connTypes = { "local", "ssh", "telnet" }; >+// String[] connTypes = { "local", "ssh"}; > > for (int i = 0; i < connTypes.length; i++) { > String suiteName = connTypes[i]; >@@ -173,4 +178,32 @@ > assertTrue(matchFound); > } > >+ public void testRunCommandViaHostShellProcessAdapter() throws Exception { >+ IHostShell hostShell = null; >+ hostShell = shellService.runCommand("", "echo test" >+ + shellSubSystem.getParentRemoteCmdSubSystemConfiguration() >+ .getCommandSeparator() + " exit", new String[] {}, mon); >+ HostShellProcessAdapter p = null; >+ try { >+ p = new HostShellProcessAdapter(hostShell); >+ } catch (Exception e) { >+ fail(e.getMessage()); >+ return; >+ } >+ BufferedReader bufferReader = new BufferedReader(new InputStreamReader( >+ p.getInputStream())); >+ >+ String nextLine; >+ boolean matchFound = false; >+ try { >+ while ((nextLine = bufferReader.readLine()) != null) { >+ matchFound = nextLine.equals("test"); >+ } >+ bufferReader.close(); >+ } catch (IOException e) { >+ fail(e.getMessage()); >+ } >+ assertTrue(matchFound); >+ } >+ > }
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 252060
: 120183 |
120481