dongjoon-hyun commented on code in PR #57165:
URL: https://github.com/apache/spark/pull/57165#discussion_r3555533040
##########
core/src/test/scala/org/apache/spark/deploy/worker/ui/LogPageSuite.scala:
##########
@@ -75,6 +76,32 @@ class LogPageSuite extends SparkFunSuite with
PrivateMethodTester {
assert(error4.startsWith("Error: invalid log directory"))
}
+ test("render encodes request parameters embedded in the inline script") {
+ val webui = mock(classOf[WorkerWebUI])
+ val worker = mock(classOf[Worker])
+ val tmpDir = new File(sys.props("java.io.tmpdir"))
+ val workDir = new File(tmpDir, "work-dir")
+ workDir.mkdir()
Review Comment:
Since this is a new test case, shall we use `withTempDir`?
```scala
withTempDir { workDir =>
val webui = mock(classOf[WorkerWebUI])
val worker = mock(classOf[Worker])
when(webui.workDir).thenReturn(workDir)
...
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]