aboutsummaryrefslogtreecommitdiff
path: root/streaming
diff options
context:
space:
mode:
authorAhmed Mahran <ahmed.mahran@mashin.io>2016-06-22 10:39:24 -0700
committerShixiong Zhu <shixiong@databricks.com>2016-06-22 10:39:24 -0700
commitc2cebdb7ddff3d041d548fe1cd8de4efb31b294f (patch)
tree9ad9554c41366adb253942cd8255ca328d41e814 /streaming
parent0a9c02759515c41de37db6381750bc3a316c860c (diff)
downloadspark-c2cebdb7ddff3d041d548fe1cd8de4efb31b294f.tar.gz
spark-c2cebdb7ddff3d041d548fe1cd8de4efb31b294f.tar.bz2
spark-c2cebdb7ddff3d041d548fe1cd8de4efb31b294f.zip
[SPARK-16120][STREAMING] getCurrentLogFiles in ReceiverSuite WAL generating and cleaning case uses external variable instead of the passed parameter
## What changes were proposed in this pull request? In `ReceiverSuite.scala`, in the test case "write ahead log - generating and cleaning", the inner method `getCurrentLogFiles` uses external variable `logDirectory1` instead of the passed parameter `logDirectory`. This PR fixes this by using the passed method argument instead of variable from the outer scope. ## How was this patch tested? The unit test was re-run and the output logs were checked for the correct paths used. tdas Author: Ahmed Mahran <ahmed.mahran@mashin.io> Closes #13825 from ahmed-mahran/b-receiver-suite-wal-gen-cln.
Diffstat (limited to 'streaming')
-rw-r--r--streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala
index 917232c9cd..1b1e21f6e5 100644
--- a/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala
+++ b/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala
@@ -215,7 +215,7 @@ class ReceiverSuite extends TestSuiteBase with Timeouts with Serializable {
def getCurrentLogFiles(logDirectory: File): Seq[String] = {
try {
if (logDirectory.exists()) {
- logDirectory1.listFiles().filter { _.getName.startsWith("log") }.map { _.toString }
+ logDirectory.listFiles().filter { _.getName.startsWith("log") }.map { _.toString }
} else {
Seq.empty
}