summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2015-07-20 10:57:52 -0400
committerSeth Tisue <seth@tisue.net>2015-07-20 10:57:52 -0400
commit100a234882a86a249ebe586b4e75fede58c098c3 (patch)
treed7b2fc7d8c5b2f599af17bd0430d6773b06faf9d /test/files
parent8f0c4b42617903ef974e25ff45250a34e93f40e7 (diff)
parenta2973dfd954c0c094f956becb05a82bee5f7da01 (diff)
downloadscala-100a234882a86a249ebe586b4e75fede58c098c3.tar.gz
scala-100a234882a86a249ebe586b4e75fede58c098c3.tar.bz2
scala-100a234882a86a249ebe586b4e75fede58c098c3.zip
Merge pull request #4629 from adriaanm/unforkjoin
Remove our fork of forkjoin. Java 8 bundles it.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/jvm/future-spec.check2
-rw-r--r--test/files/jvm/future-spec/FutureTests.scala2
-rw-r--r--test/files/jvm/scala-concurrent-tck.check2
-rw-r--r--test/files/jvm/scala-concurrent-tck.scala2
-rw-r--r--test/files/jvm/t7146.check7
-rw-r--r--test/files/jvm/t7146.scala28
6 files changed, 21 insertions, 22 deletions
diff --git a/test/files/jvm/future-spec.check b/test/files/jvm/future-spec.check
index 5c80aa5586..50c5d446af 100644
--- a/test/files/jvm/future-spec.check
+++ b/test/files/jvm/future-spec.check
@@ -1 +1 @@
-warning: there were 21 deprecation warnings; re-run with -deprecation for details
+warning: there were 20 deprecation warnings; re-run with -deprecation for details
diff --git a/test/files/jvm/future-spec/FutureTests.scala b/test/files/jvm/future-spec/FutureTests.scala
index 6b34d5bfaa..abcf1b4cbc 100644
--- a/test/files/jvm/future-spec/FutureTests.scala
+++ b/test/files/jvm/future-spec/FutureTests.scala
@@ -37,7 +37,7 @@ class FutureTests extends MinimalScalaTest {
"A future with custom ExecutionContext" should {
"shouldHandleThrowables" in {
val ms = new mutable.HashSet[Throwable] with mutable.SynchronizedSet[Throwable]
- implicit val ec = scala.concurrent.ExecutionContext.fromExecutor(new scala.concurrent.forkjoin.ForkJoinPool(), {
+ implicit val ec = scala.concurrent.ExecutionContext.fromExecutor(new java.util.concurrent.ForkJoinPool(), {
t =>
ms += t
})
diff --git a/test/files/jvm/scala-concurrent-tck.check b/test/files/jvm/scala-concurrent-tck.check
index bbe73c9982..9aef07d1e5 100644
--- a/test/files/jvm/scala-concurrent-tck.check
+++ b/test/files/jvm/scala-concurrent-tck.check
@@ -1 +1 @@
-warning: there were 74 deprecation warnings; re-run with -deprecation for details
+warning: there were 73 deprecation warnings; re-run with -deprecation for details
diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala
index ba405e97bd..8069028cf5 100644
--- a/test/files/jvm/scala-concurrent-tck.scala
+++ b/test/files/jvm/scala-concurrent-tck.scala
@@ -629,7 +629,7 @@ trait BlockContexts extends TestBase {
// test BlockContext in our default ExecutionContext
def testDefaultFJP(): Unit = {
val bc = getBlockContext(BlockContext.current)
- assert(bc.isInstanceOf[scala.concurrent.forkjoin.ForkJoinWorkerThread])
+ assert(bc.isInstanceOf[java.util.concurrent.ForkJoinWorkerThread])
}
// test BlockContext inside BlockContext.withBlockContext
diff --git a/test/files/jvm/t7146.check b/test/files/jvm/t7146.check
index 7c76040205..b2c6e444f7 100644
--- a/test/files/jvm/t7146.check
+++ b/test/files/jvm/t7146.check
@@ -1,5 +1,4 @@
-should be scala.concurrent.impl.ExecutionContextImpl == true
-should be scala.concurrent.forkjoin.ForkJoinPool == true
+ExecutionContext.global is a scala.concurrent.impl.ExecutionContextImpl.
should have non-null UncaughtExceptionHandler == true
-should be a scala.concurrent.impl.ExecutionContextImpl UncaughtExceptionHandler == true
-should just print out on uncaught == true
+ExecutionContext.global.executor.getUncaughtExceptionHandler is a scala.concurrent.impl.ExecutionContextImpl.
+should just print out on uncaught: true
diff --git a/test/files/jvm/t7146.scala b/test/files/jvm/t7146.scala
index ea734472d5..89030730a9 100644
--- a/test/files/jvm/t7146.scala
+++ b/test/files/jvm/t7146.scala
@@ -5,21 +5,21 @@ import scala.concurrent._
import scala.util.control.NoStackTrace
object Test {
- def main(args: Array[String]) {
- println("should be scala.concurrent.impl.ExecutionContextImpl == " +
- ExecutionContext.global.toString.startsWith("scala.concurrent.impl.ExecutionContextImpl"))
- val i = ExecutionContext.global.asInstanceOf[{ def executor: Executor }]
- println("should be scala.concurrent.forkjoin.ForkJoinPool == " +
- (i.executor.getClass.getSuperclass.getName == "scala.concurrent.forkjoin.ForkJoinPool"))
- val u = i.executor.
+ def main(args: Array[String]): Unit = {
+ val ec = ExecutionContext.global.toString
+ if (ec startsWith "scala.concurrent.impl.ExecutionContextImpl")
+ println("ExecutionContext.global is a scala.concurrent.impl.ExecutionContextImpl.")
+ else println(s"!! ExecutionContext.global == $ec")
+
+ val u = ExecutionContext.global.asInstanceOf[{ def executor: Executor }].executor.
asInstanceOf[{ def getUncaughtExceptionHandler: Thread.UncaughtExceptionHandler }].
getUncaughtExceptionHandler
- println("should have non-null UncaughtExceptionHandler == " + (u ne null))
- println("should be a scala.concurrent.impl.ExecutionContextImpl UncaughtExceptionHandler == " +
- u.toString.startsWith("scala.concurrent.impl.ExecutionContextImpl"))
- print("should just print out on uncaught == ")
- u.uncaughtException(Thread.currentThread, new Throwable {
- override def printStackTrace() { println("true") }
- })
+ println(s"should have non-null UncaughtExceptionHandler == ${u ne null}")
+ if (u.toString startsWith "scala.concurrent.impl.ExecutionContextImpl")
+ println("ExecutionContext.global.executor.getUncaughtExceptionHandler is a scala.concurrent.impl.ExecutionContextImpl.")
+ else println(s"!! ExecutionContext.global.executor.getUncaughtExceptionHandler == $u")
+
+ print("should just print out on uncaught: ")
+ u.uncaughtException(Thread.currentThread, new Throwable { override def printStackTrace() { println("true") } })
}
}