From 5aac086d63807331e380bb2d861e4e07800b1f63 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 16 Feb 2017 23:35:18 +0100 Subject: Disable tests that require scala-compiler This is necessary if we ever want to get rid of our dependency on scala-compiler --- tests/disabled/scalac-dependent/run/t1618.scala | 11 +++++++++++ tests/disabled/scalac-dependent/run/t7775.scala | 17 +++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/disabled/scalac-dependent/run/t1618.scala create mode 100644 tests/disabled/scalac-dependent/run/t7775.scala (limited to 'tests/disabled/scalac-dependent/run') diff --git a/tests/disabled/scalac-dependent/run/t1618.scala b/tests/disabled/scalac-dependent/run/t1618.scala new file mode 100644 index 000000000..248af9b4f --- /dev/null +++ b/tests/disabled/scalac-dependent/run/t1618.scala @@ -0,0 +1,11 @@ + +object Test extends dotty.runtime.LegacyApp { + import scala.tools.nsc.io._ + + val dir: VirtualDirectory = new VirtualDirectory("foo", None) + dir.subdirectoryNamed("foo") + assert(dir.lookupName("foo", true) != null) + +} + + diff --git a/tests/disabled/scalac-dependent/run/t7775.scala b/tests/disabled/scalac-dependent/run/t7775.scala new file mode 100644 index 000000000..bc6a67d0e --- /dev/null +++ b/tests/disabled/scalac-dependent/run/t7775.scala @@ -0,0 +1,17 @@ +import scala.concurrent.{duration, Future, Await, ExecutionContext} +import scala.tools.nsc.Settings +import ExecutionContext.Implicits.global + +// Was failing pretty regularly with a ConcurrentModificationException as +// WrappedProperties#systemProperties iterated directly over the mutable +// global system properties map. +object Test { + def main(args: Array[String]): Unit = { + val tries = 1000 // YMMV + val compiler = Future { + for(_ <- 1 to tries) new Settings(_ => {}) + } + for(i <- 1 to tries * 10) System.setProperty(s"foo$i", i.toString) + Await.result(compiler, duration.Duration.Inf) + } +} -- cgit v1.2.3