Skip to content

Commit 0d3ec73

Browse files
committed
remove ssc.stop
1 parent 9797843 commit 0d3ec73

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

mllib/src/test/scala/org/apache/spark/mllib/regression/StreamingLinearRegressionSuite.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ class StreamingLinearRegressionSuite extends FunSuite with TestSuiteBase {
7777
val validationData = LinearDataGenerator.generateLinearInput(0.0, Array(10.0, 10.0), 100, 17)
7878
validatePrediction(validationData.map(row => model.latestModel().predict(row.features)),
7979
validationData)
80-
81-
ssc.stop()
8280
}
8381

8482
// Test that parameter estimates improve when learning Y = 10*X1 on streaming data
@@ -113,8 +111,6 @@ class StreamingLinearRegressionSuite extends FunSuite with TestSuiteBase {
113111
assert(deltas.forall(x => (x._1 - x._2) <= 0.1))
114112
// check that error shrunk on at least 2 batches
115113
assert(deltas.map(x => if ((x._1 - x._2) < 0) 1 else 0).sum > 1)
116-
117-
ssc.stop()
118114
}
119115

120116
// Test predictions on a stream
@@ -142,7 +138,5 @@ class StreamingLinearRegressionSuite extends FunSuite with TestSuiteBase {
142138
// compute the mean absolute error and check that it's always less than 0.1
143139
val errors = output.map(batch => batch.map(p => math.abs(p._1 - p._2)).sum / nPoints)
144140
assert(errors.forall(x => x <= 0.1))
145-
146-
ssc.stop()
147141
}
148142
}

0 commit comments

Comments
 (0)