Skip to content
Snippets Groups Projects
Commit c2cebdb7 authored by Ahmed Mahran's avatar Ahmed Mahran Committed by Shixiong Zhu
Browse files

[SPARK-16120][STREAMING] getCurrentLogFiles in ReceiverSuite WAL generating...

[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.
parent 0a9c0275
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment