Decreased running time of monte carlo test
authorJustin Worthe <justin@worthe-it.co.za>
Sun, 15 Jul 2018 20:08:41 +0000 (22:08 +0200)
committerJustin Worthe <justin@worthe-it.co.za>
Sun, 15 Jul 2018 20:08:41 +0000 (22:08 +0200)
tests/monte_carlo_test.rs

index 43476fd..87feadb 100644 (file)
@@ -14,6 +14,8 @@ fn it_does_a_normal_turn_successfully() {
         Ok(ok) => ok,
         Err(error) => panic!("Error while parsing JSON file: {}", error)
     };
-    let max_time = Duration::milliseconds(1950);
+    let max_time = Duration::milliseconds(200);
     strategy::monte_carlo::choose_move(&settings, &state, &start_time, max_time);
+
+    assert!(start_time.to(PreciseTime::now()) < max_time + Duration::milliseconds(10))
 }