-
Notifications
You must be signed in to change notification settings - Fork 291
Closed
Description
Steps to reproduce
[TestClass]
public class TestCleanup
{
[TestInitialize()]
public void MyTestInitialize()
{
Console.WriteLine("Calling initialize");
}
// Use TestCleanup to run code after each test has run
[TestCleanup()]
public void MyTestCleanup()
{
MessageBox.Show("Cleanup");
Console.WriteLine( ng cleanup");
}
[Timeout(5000)]
[TestMethod]
public void TestMethod1()
{
Console.WriteLine("Sleeping for 10 seconds");
System.Threading.Thread.Sleep(10000);
Console.WriteLine("Waking up");
}
} Expected behavior
It is essential all tests execute their TestCleanup code, as this code may have important steps to recover from an error such as a time out.
Actual behavior
The result of executing this code is the test times out but the message box is not displayed and the Calling cleanup message is not written to the console.
MattacksWTW, padmesky, flobadob, jessetrinity, bitsmithsys and 21 moreairadavometrakzuairadavometraairadavometra and Felicity-Rairadavometra and Felicity-R