Commits

Johannes Rudolph  committed 39cc529

Further attempts at reducing flicker tests (Silverlight is even worse).

  • Participants
  • Parent commits 5024b79

Comments (0)

Files changed (2)

File test/SubSpec.Tests/SpecificationPrimitiveFacts.cs

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

File 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 50ms to establish".Context( () => Thread.Sleep( 10 ) ).WithTimeout( 50 );
-        "When we do something that should not take longer than 50ms".Do( () => Thread.Sleep( 10 ) ).WithTimeout( 50 );
-        "Assert something within 50ms".Assert( () => Thread.Sleep( 10 ) ).WithTimeout( 50 );
-        "Observe something within 50ms".Observation( () => Thread.Sleep( 10 ) ).WithTimeout( 50 );
-        "Observe something within 51ms".Observation( () => Thread.Sleep( 11 ) ).WithTimeout( 51 );
+        "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 );
     }