Repository: spark
Updated Branches:
  refs/heads/branch-2.0 76d0ef34e -> 520828c90


[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 <[email protected]>

Closes #13825 from ahmed-mahran/b-receiver-suite-wal-gen-cln.

(cherry picked from commit c2cebdb7ddff3d041d548fe1cd8de4efb31b294f)
Signed-off-by: Shixiong Zhu <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/520828c9
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/520828c9
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/520828c9

Branch: refs/heads/branch-2.0
Commit: 520828c90d25acf733ffa70fe269dcfe93b56a31
Parents: 76d0ef3
Author: Ahmed Mahran <[email protected]>
Authored: Wed Jun 22 10:39:24 2016 -0700
Committer: Shixiong Zhu <[email protected]>
Committed: Wed Jun 22 10:39:38 2016 -0700

----------------------------------------------------------------------
 .../src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/520828c9/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala
----------------------------------------------------------------------
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 917232c..1b1e21f 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
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to