Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added more tests

  • Loading branch information...
commit 126bdd1ebc5f53d61cd3f1b27be5711425f6833a 1 parent 8122d42
Nathan Grasso Bronson authored January 13, 2011
13  src/test/scala/scala/concurrent/stm/RetrySuite.scala
@@ -418,4 +418,17 @@ class RetrySuite extends FunSuite {
418 418
       TxnExecutor.transformDefault( _ => orig )
419 419
     }
420 420
   }
  421
+
  422
+  test("tighter timeout wins") {
  423
+    val t0 = System.currentTimeMillis
  424
+    intercept[InterruptedException] {
  425
+      atomic.withRetryTimeout(100) { implicit txn =>
  426
+        atomic.withRetryTimeout(1000) { implicit txn =>
  427
+          retry
  428
+        }
  429
+      }
  430
+    }
  431
+    val elapsed = System.currentTimeMillis - t0
  432
+    assert(elapsed >= 100 && elapsed < 150)
  433
+  }
421 434
 }

0 notes on commit 126bdd1

Please sign in to comment.
Something went wrong with that request. Please try again.