aboutsummaryrefslogtreecommitdiff
path: root/bagel
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2015-09-17 22:05:20 -0700
committerReynold Xin <rxin@databricks.com>2015-09-17 22:05:20 -0700
commitd009da2f5c803f3b7344c96abbfcf3ecef2f5ad2 (patch)
tree9b9a40389046b3ff5ec84012c2e811b30ce20187 /bagel
parent98f1ea67da1b0e3aa791c3cbfa06e48e2ba0d75b (diff)
downloadspark-d009da2f5c803f3b7344c96abbfcf3ecef2f5ad2.tar.gz
spark-d009da2f5c803f3b7344c96abbfcf3ecef2f5ad2.tar.bz2
spark-d009da2f5c803f3b7344c96abbfcf3ecef2f5ad2.zip
[SPARK-10682] [GRAPHX] Remove Bagel test suites.
Bagel has been deprecated and we haven't done any changes to it. There is no need to run those tests. This should speed up tests by 1 min. Author: Reynold Xin <rxin@databricks.com> Closes #8807 from rxin/SPARK-10682.
Diffstat (limited to 'bagel')
-rw-r--r--bagel/src/test/resources/log4j.properties27
-rw-r--r--bagel/src/test/scala/org/apache/spark/bagel/BagelSuite.scala113
2 files changed, 0 insertions, 140 deletions
diff --git a/bagel/src/test/resources/log4j.properties b/bagel/src/test/resources/log4j.properties
deleted file mode 100644
index edbecdae92..0000000000
--- a/bagel/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# Set everything to be logged to the file target/unit-tests.log
-log4j.rootCategory=INFO, file
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.append=true
-log4j.appender.file.file=target/unit-tests.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
-
-# Ignore messages below warning level from Jetty, because it's a bit verbose
-log4j.logger.org.spark-project.jetty=WARN
diff --git a/bagel/src/test/scala/org/apache/spark/bagel/BagelSuite.scala b/bagel/src/test/scala/org/apache/spark/bagel/BagelSuite.scala
deleted file mode 100644
index fb10d734ac..0000000000
--- a/bagel/src/test/scala/org/apache/spark/bagel/BagelSuite.scala
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.spark.bagel
-
-import org.scalatest.{BeforeAndAfter, Assertions}
-import org.scalatest.concurrent.Timeouts
-import org.scalatest.time.SpanSugar._
-
-import org.apache.spark._
-import org.apache.spark.storage.StorageLevel
-
-class TestVertex(val active: Boolean, val age: Int) extends Vertex with Serializable
-class TestMessage(val targetId: String) extends Message[String] with Serializable
-
-class BagelSuite extends SparkFunSuite with Assertions with BeforeAndAfter with Timeouts {
-
- var sc: SparkContext = _
-
- after {
- if (sc != null) {
- sc.stop()
- sc = null
- }
- }
-
- test("halting by voting") {
- sc = new SparkContext("local", "test")
- val verts = sc.parallelize(Array("a", "b", "c", "d").map(id => (id, new TestVertex(true, 0))))
- val msgs = sc.parallelize(Array[(String, TestMessage)]())
- val numSupersteps = 5
- val result =
- Bagel.run(sc, verts, msgs, sc.defaultParallelism) {
- (self: TestVertex, msgs: Option[Array[TestMessage]], superstep: Int) =>
- (new TestVertex(superstep < numSupersteps - 1, self.age + 1), Array[TestMessage]())
- }
- for ((id, vert) <- result.collect) {
- assert(vert.age === numSupersteps)
- }
- }
-
- test("halting by message silence") {
- sc = new SparkContext("local", "test")
- val verts = sc.parallelize(Array("a", "b", "c", "d").map(id => (id, new TestVertex(false, 0))))
- val msgs = sc.parallelize(Array("a" -> new TestMessage("a")))
- val numSupersteps = 5
- val result =
- Bagel.run(sc, verts, msgs, sc.defaultParallelism) {
- (self: TestVertex, msgs: Option[Array[TestMessage]], superstep: Int) =>
- val msgsOut =
- msgs match {
- case Some(ms) if (superstep < numSupersteps - 1) =>
- ms
- case _ =>
- Array[TestMessage]()
- }
- (new TestVertex(self.active, self.age + 1), msgsOut)
- }
- for ((id, vert) <- result.collect) {
- assert(vert.age === numSupersteps)
- }
- }
-
- test("large number of iterations") {
- // This tests whether jobs with a large number of iterations finish in a reasonable time,
- // because non-memoized recursion in RDD or DAGScheduler used to cause them to hang
- failAfter(30 seconds) {
- sc = new SparkContext("local", "test")
- val verts = sc.parallelize((1 to 4).map(id => (id.toString, new TestVertex(true, 0))))
- val msgs = sc.parallelize(Array[(String, TestMessage)]())
- val numSupersteps = 50
- val result =
- Bagel.run(sc, verts, msgs, sc.defaultParallelism) {
- (self: TestVertex, msgs: Option[Array[TestMessage]], superstep: Int) =>
- (new TestVertex(superstep < numSupersteps - 1, self.age + 1), Array[TestMessage]())
- }
- for ((id, vert) <- result.collect) {
- assert(vert.age === numSupersteps)
- }
- }
- }
-
- test("using non-default persistence level") {
- failAfter(10 seconds) {
- sc = new SparkContext("local", "test")
- val verts = sc.parallelize((1 to 4).map(id => (id.toString, new TestVertex(true, 0))))
- val msgs = sc.parallelize(Array[(String, TestMessage)]())
- val numSupersteps = 20
- val result =
- Bagel.run(sc, verts, msgs, sc.defaultParallelism, StorageLevel.DISK_ONLY) {
- (self: TestVertex, msgs: Option[Array[TestMessage]], superstep: Int) =>
- (new TestVertex(superstep < numSupersteps - 1, self.age + 1), Array[TestMessage]())
- }
- for ((id, vert) <- result.collect) {
- assert(vert.age === numSupersteps)
- }
- }
- }
-}