axuno/MailMergeLib

Test CancelSendOperationWithDelay fails on Linux

axunonb opened this issue · 4 comments

Originally posted by @thegruffalo in #19 (comment)

@thegruffalo Looks like I need a Linux system. What setup are you using on your side?

I use Ubuntu 19.04.
The easiest thing to do would be to use a VM (VirtualBox or similar) with a desktop Ubuntu installation - https://ubuntu.com/download/desktop
Then install dotnetcore sdk https://dotnet.microsoft.com/download/linux-package-manager/ubuntu19-04/sdk-current
Then install vscode https://code.visualstudio.com/download (select the .deb package)

Thanks for your hint. I've installed Ubuntu and use it with WSL now. Pretty good experience.

This had 2 reasons:

  1. The test assumed, the task can be cancelled even for the first message before it is sent. Given the tiny size of the test message, this is not reliable and depending on the SMTP connection and server. This was not well designed.
  2. SmtpClientConfig.DelayBetweenMessages was not applied before sending the first message.

Resolved with commit 033b984