spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zsxw...@apache.org
Subject spark git commit: [SPARK-16120][STREAMING] getCurrentLogFiles in ReceiverSuite WAL generating and cleaning case uses external variable instead of the passed parameter
Date Wed, 22 Jun 2016 17:39:30 GMT
Repository: spark
Updated Branches:
  refs/heads/master 0a9c02759 -> c2cebdb7d


[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.


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

Branch: refs/heads/master
Commit: c2cebdb7ddff3d041d548fe1cd8de4efb31b294f
Parents: 0a9c027
Author: Ahmed Mahran <ahmed.mahran@mashin.io>
Authored: Wed Jun 22 10:39:24 2016 -0700
Committer: Shixiong Zhu <shixiong@databricks.com>
Committed: Wed Jun 22 10:39:24 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/c2cebdb7/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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message