Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ExceptionDispatchInfo to retain call stack in AsyncResult.EndInvoke() #1470

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

scott-xu
Copy link
Collaborator

@scott-xu scott-xu commented Aug 11, 2024

Trying to understand some flaky tests.
e.g.

  Failed Test_Sftp_Multiple_Async_Upload_And_Download_10Files_5MB_Each [2 s]
  Error Message:
   Test method Renci.SshNet.IntegrationTests.OldIntegrationTests.SftpClientTest.Test_Sftp_Multiple_Async_Upload_And_Download_10Files_5MB_Each threw exception: 
Renci.SshNet.Common.SshConnectionException: Client not connected.
  Stack Trace:
      at Renci.SshNet.Common.AsyncResult.EndInvoke() in /_/src/Renci.SshNet/Common/AsyncResult.cs:line 88
   at Renci.SshNet.SftpClient.EndUploadFile(IAsyncResult asyncResult) in /_/src/Renci.SshNet/SftpClient.cs:line 1165
   at Renci.SshNet.IntegrationTests.OldIntegrationTests.SftpClientTest.Test_Sftp_Multiple_Async_Upload_And_Download_10Files_5MB_Each() in /home/appveyor/projects/ssh-net/test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.Upload.cs:line 150
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Standard Output Messages:
 SSH Server host name: 127.0.0.1

@scott-xu scott-xu marked this pull request as ready for review August 11, 2024 15:31
Copy link
Collaborator

@Rob-Hague Rob-Hague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one often fails locally for me - in the past I looked at it and concluded the OpenSSH instance in the container was either erroring out or crashing (IIRC), but I did not work out why or whether it's our fault. Presumably it is.

@Rob-Hague Rob-Hague merged commit a067e28 into sshnet:develop Aug 12, 2024
1 check passed
@scott-xu scott-xu deleted the ExceptionDispatchInfo branch August 14, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants