summaryrefslogtreecommitdiff
path: root/test/files/jvm/future-spec/PromiseTests.scala
diff options
context:
space:
mode:
authorJames Iry <james.iry@typesafe.com>2013-07-22 16:23:31 -0700
committerJames Iry <james.iry@typesafe.com>2013-11-01 15:30:23 -0700
commit0057d4d83cb40116b76296505f15075002e4b2e0 (patch)
tree5ca6f18bff686f3167eda21055e7bdd2b191e86f /test/files/jvm/future-spec/PromiseTests.scala
parent9b8d108ed7cb1a049e4e8500b6896e9554328aab (diff)
downloadscala-0057d4d83cb40116b76296505f15075002e4b2e0.tar.gz
scala-0057d4d83cb40116b76296505f15075002e4b2e0.tar.bz2
scala-0057d4d83cb40116b76296505f15075002e4b2e0.zip
Make future-spec tests not spawn threads in constructors.
The future-spec tests were spawning threads in object constructors which meant they were on the ragged edge of entering deadlock from the static initialization lock acquired during the static initialization blocks we use to construct object reference fields. My work on restructuring lambdas pushed it over the edge. This commit refactors the tests to use class constructors rather than object constructors.
Diffstat (limited to 'test/files/jvm/future-spec/PromiseTests.scala')
-rw-r--r--test/files/jvm/future-spec/PromiseTests.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/jvm/future-spec/PromiseTests.scala b/test/files/jvm/future-spec/PromiseTests.scala
index 6e613bf3ec..49350586b8 100644
--- a/test/files/jvm/future-spec/PromiseTests.scala
+++ b/test/files/jvm/future-spec/PromiseTests.scala
@@ -9,7 +9,7 @@ import scala.runtime.NonLocalReturnControl
import scala.util.{Try,Success,Failure}
-object PromiseTests extends MinimalScalaTest {
+class PromiseTests extends MinimalScalaTest {
import ExecutionContext.Implicits._
val defaultTimeout = Inf