Commits

Johannes Rudolph committed e51d29a

Changed TimeoutSpecifications names to better reflect the scenario tested.
Increase sleep/timeout ratio to make tests more predictable.

Comments (0)

Files changed (1)

test/SubSpec.Tests/Acceptance Tests/TimeoutSpecifications.cs

 				using SubSpec;";
 
     [Fact]
-    public void ContextTimeoutUsingAssert()
+    public void TimeoutInContextWithAssertExecutorMakesTestFail()
     {
         string code = USINGS + @"
                 public class MockTestClass
 					[Specification]
 					public void Spec()
 					{
-						"""".Context(() => {Thread.Sleep(20);}).WithTimeout(10);
+						"""".Context(() => {Thread.Sleep(30);}).WithTimeout(10);
 		
 						"""".Assert(() => {});
 					}
     }
 
     [Fact]
-    public void ContextTimeoutUsingObservation()
+    public void TimeoutInContextWithObservationExecutorMakesTestFail()
     {
         string code = USINGS + @"
                 public class MockTestClass
 					[Specification]
 					public void Spec()
 					{
-						"""".Context(() => {Thread.Sleep(20);}).WithTimeout(10);
+						"""".Context(() => {Thread.Sleep(30);}).WithTimeout(10);
 		
 						"""".Observation(() => {});
 					}
     }
 
     [Fact]
-    public void DoTimeoutUsingAssert()
+    public void TimeoutInDoWithAssertExecutorMakesTestFail()
     {
         string code = USINGS + @"
                 public class MockTestClass
 					public void Spec()
 					{
 						"""".Context(() => {} );
-		                """".Do( () => {Thread.Sleep(20);} ).WithTimeout(10);
+		                """".Do( () => {Thread.Sleep(30);} ).WithTimeout(10);
 						"""".Assert(() => {});
 					}
                 }";
     }
 
     [Fact]
-    public void DoTimeoutUsingObservation()
+    public void TimeoutInDoWithObservationExecutorMakesTestFail()
     {
         string code = USINGS + @"
                 public class MockTestClass
 					public void Spec()
 					{
 						"""".Context(() => {} );
-		                """".Do( () => {Thread.Sleep(20);} ).WithTimeout(10);
+		                """".Do( () => {Thread.Sleep(30);} ).WithTimeout(10);
 						"""".Observation(() => {});
 					}
                 }";
     }
 
     [Fact]
-    public void AssertTimeout()
+    public void TimeoutInAssertMakesTestFail()
     {
         string code = USINGS + @"
                 public class MockTestClass
 					{
 						"""".Context(() => {} );
 		                """".Do( () => {} );
-						"""".Assert(() => {Thread.Sleep(20);}).WithTimeout(10);
+						"""".Assert(() => {Thread.Sleep(30);}).WithTimeout(10);
 					}
                 }";
 
     }
 
     [Fact]
-    public void ObservationTimeout()
+    public void TimeoutInObservationMakesTestFail()
     {
         string code = USINGS + @"
                 public class MockTestClass
 					{
 						"""".Context(() => {} );
 		                """".Do( () => {} );
-						"""".Observation(() => {Thread.Sleep(20);}).WithTimeout(10);
+						"""".Observation(() => {Thread.Sleep(30);}).WithTimeout(10);
 					}
                 }";