Closed
Description
I have a test script which write a command to host and then immediately reads it to ensure that command was executed
// Writing data
SshShellStream.Write(command + "\n");
SshShellStream.Flush();
// Reading what was written
bool rc = SshShellStream.Expect(regex, timeout == null ? TimeSpan.FromMinutes(30) : (TimeSpan)timeout, out result);
if (!rc)
{
string msg = "Ssh shell Expect time out! " + result;
LogEvents.OnDebug(msg);
throw new Exception(msg);
}
The code throws exception occasionally and the result is printed as
System.Exception: Ssh shell Expect time out! sharsysadmin@my-local-host# e dest
The output expected was
sysadmin@my-local-host# share destroy
Which is same as what was returned, but was out of order
Metadata
Metadata
Assignees
Labels
No labels