diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-11-28 13:26:05 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-11-28 13:26:05 +1000 |
commit | c9c21fdb1baf21775374bfc3a2c87fd1535f8a42 (patch) | |
tree | ab0d7588709669b5d1ce8839ecef626bba4a25bd /test/files/run | |
parent | 3ac6eabae685f08fb349ddab16cbaa1c6e97984b (diff) | |
download | scala-c9c21fdb1baf21775374bfc3a2c87fd1535f8a42.tar.gz scala-c9c21fdb1baf21775374bfc3a2c87fd1535f8a42.tar.bz2 scala-c9c21fdb1baf21775374bfc3a2c87fd1535f8a42.zip |
SI-8946 Disable flaky test for reflection memory leak
It passed in PR validation but failed in a later run.
There are some clever ideas bouncing around to make it
stable, but in the meantime I'll shunt it into disabled.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t8946.scala | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/test/files/run/t8946.scala b/test/files/run/t8946.scala deleted file mode 100644 index a248a20501..0000000000 --- a/test/files/run/t8946.scala +++ /dev/null @@ -1,29 +0,0 @@ -// Tests to assert that references to threads are not strongly held when scala-reflection is used inside of them. -object Test { - import scala.ref.WeakReference - - def forceGc() = { - var obj = new Object - val ref = new WeakReference(obj) - obj = null; - while(ref.get.nonEmpty) - Array.ofDim[Byte](16 * 1024 * 1024) - } - - def main(args: Array[String]): Unit = { - val threads = for (i <- (1 to 16)) yield { - val t = new Thread { - override def run(): Unit = { - import reflect.runtime.universe._ - typeOf[List[String]] <:< typeOf[Seq[_]] - } - } - t.start() - t.join() - WeakReference(t) - } - forceGc() - val nonGCdThreads = threads.filter(_.get.nonEmpty).length - assert(nonGCdThreads == 0, s"${nonGCdThreads} threads were retained; expected 0.") - } -} |