Johannes Rudolph avatar 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 );
     }
 
     
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.