Commits

Johannes Rudolph committed 5ccc9dd

Flicker really annoys me... Think it's due to build agent running on HyperV.

Comments (0)

Files changed (3)

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

 					[Specification]
 					public void Spec()
 					{
-						"""".Context(() => {Thread.Sleep(50);}).WithTimeout(10);
+						"""".Context(() => {Thread.Sleep(1000);}).WithTimeout(10);
 						"""".Assert(() => {});
 					}
                 }";
 					[Specification]
 					public void Spec()
 					{
-						"""".Context(() => {Thread.Sleep(50);}).WithTimeout(10);
+						"""".Context(() => {Thread.Sleep(1000);}).WithTimeout(10);
 						"""".Observation(() => {});
 					}
                 }";
 					public void Spec()
 					{
 						"""".Context(() => {} );
-		                """".Do( () => {Thread.Sleep(50);} ).WithTimeout(10);
+		                """".Do( () => {Thread.Sleep(1000);} ).WithTimeout(10);
 						"""".Assert(() => {});
 					}
                 }";
 					public void Spec()
 					{
 						"""".Context(() => {} );
-		                """".Do( () => {Thread.Sleep(50);} ).WithTimeout(10);
+		                """".Do( () => {Thread.Sleep(1000);} ).WithTimeout(10);
 						"""".Observation(() => {});
 					}
                 }";
 					{
 						"""".Context(() => {} );
 		                """".Do( () => {} );
-						"""".Assert(() => {Thread.Sleep(50);}).WithTimeout(10);
+						"""".Assert(() => {Thread.Sleep(1000);}).WithTimeout(10);
 					}
                 }";
 
 					{
 						"""".Context(() => {} );
 		                """".Do( () => {} );
-						"""".Observation(() => {Thread.Sleep(50);}).WithTimeout(10);
+						"""".Observation(() => {Thread.Sleep(1000);}).WithTimeout(10);
 					}
                 }";
 

test/SubSpec.Tests/SpecificationPrimitiveFacts.cs

     [Fact]
     public void Execute_Action_WithTimeout_FailsCorrectly()
     {
-        SpecificationPrimitive<Action> sut = new SpecificationPrimitive<Action>( "", () => Thread.Sleep( 200 ) );
+        SpecificationPrimitive<Action> sut = new SpecificationPrimitive<Action>( "", () => Thread.Sleep( 1000 ) );
 
         sut.WithTimeout( 10 );
 

test/SubSpec.Tests/SubSpecDemo.cs

     {
         // You can have individual timeouts per specification primitive
         // Change the sleep time or timeouts to see them fail
-        "Given a context that should not take longer than 200ms  to establish".Context( () => Thread.Sleep( 10 ) ).WithTimeout( 200 );
-        "When we do something that should not take longer than 200ms ".Do( () => Thread.Sleep( 10 ) ).WithTimeout( 200 );
-        "Assert something within 200ms ".Assert( () => Thread.Sleep( 10 ) ).WithTimeout( 200 );
-        "Observe something within 200ms ".Observation( () => Thread.Sleep( 10 ) ).WithTimeout( 200 );
-        "Observe something within 201ms".Observation( () => Thread.Sleep( 11 ) ).WithTimeout( 201 );
+        "Given a context that should not take longer than 1000ms  to establish".Context( () => Thread.Sleep( 10 ) ).WithTimeout( 1000 );
+        "When we do something that should not take longer than 1000ms ".Do( () => Thread.Sleep( 10 ) ).WithTimeout( 1000 );
+        "Assert something within 1000ms ".Assert( () => Thread.Sleep( 10 ) ).WithTimeout( 1000 );
+        "Observe something within 1000ms ".Observation( () => Thread.Sleep( 10 ) ).WithTimeout( 1000 );
+        "Observe something within 1001ms".Observation( () => Thread.Sleep( 11 ) ).WithTimeout( 10001 );
     }