From 5caf388a755617d8272fd0d24b8069434adc261a Mon Sep 17 00:00:00 2001
From: Etienne Kneuss <colder@php.net>
Date: Mon, 2 Sep 2013 15:32:29 +0200
Subject: [PATCH] Timeout tests that take too long, just in case

---
 src/test/scala/leon/test/LeonTestSuite.scala | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/test/scala/leon/test/LeonTestSuite.scala b/src/test/scala/leon/test/LeonTestSuite.scala
index f802d73b2..3ee2480d6 100644
--- a/src/test/scala/leon/test/LeonTestSuite.scala
+++ b/src/test/scala/leon/test/LeonTestSuite.scala
@@ -1,10 +1,12 @@
 package leon.test
 import scala.io.Source
 import org.scalatest._
+import org.scalatest.concurrent._
+import org.scalatest.time.SpanSugar._
 
 import java.io.File
 
-trait LeonTestSuite extends FunSuite {
+trait LeonTestSuite extends FunSuite with Timeouts {
   def now() = {
     System.currentTimeMillis
   }
@@ -72,7 +74,9 @@ trait LeonTestSuite extends FunSuite {
       val id = testIdentifier(name)
       val ts = now()
 
-      body
+      failAfter(2.minutes) {
+        body
+      }
 
       val total = now()-ts
 
-- 
GitLab