This is an automated email from the ASF dual-hosted git repository.
yangjie01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 2441bdc49f1 [SPARK-44521][CONNECT][TESTS] Use `Utils.createTempDir` to
make the dirs generated by `SparkConnectServiceSuite` is cleaned up after
testing
2441bdc49f1 is described below
commit 2441bdc49f18a535ed098b2cd08bab8ba18bf9ac
Author: yangjie01 <[email protected]>
AuthorDate: Mon Jul 24 17:30:04 2023 +0800
[SPARK-44521][CONNECT][TESTS] Use `Utils.createTempDir` to make the dirs
generated by `SparkConnectServiceSuite` is cleaned up after testing
### What changes were proposed in this pull request?
This pr change to use `Utils.createTempDir` to make the dirs generated by
`SparkConnectServiceSuite` is cleaned up after testing.
### Why are the changes needed?
There are residual directories after run `SparkConnectServiceSuite` like
follows:
```
connector/connect/server/282ce745-440f-44ac-9f43-4fad70d89a44/
connector/connect/server/my/
```
The test cases should ensure that they are cleaned up after testing.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
- Pass GitHub Actions
- Manual checked:
```
build/sbt "connect/testOnly
org.apache.spark.sql.connect.planner.SparkConnectServiceSuite"
git status
```
Before
```
connector/connect/server/7e7f16c4-4792-4ddc-b7b0-08d3b1d1b8fe/
connector/connect/server/my/
```
After
No diff
Closes #42122 from LuciferYang/SPARK-44521.
Authored-by: yangjie01 <[email protected]>
Signed-off-by: yangjie01 <[email protected]>
---
.../apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala
b/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala
index 498084efb8f..d820e65a685 100644
---
a/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala
+++
b/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala
@@ -252,7 +252,7 @@ class SparkConnectServiceSuite extends SharedSparkSession
with MockitoSugar with
.newBuilder()
.setInput(
proto.Relation.newBuilder().setSql(proto.SQL.newBuilder().setQuery("select 1")))
- .setPath("my/test/path")
+ .setPath(Utils.createTempDir().getAbsolutePath)
.setMode(proto.WriteOperation.SaveMode.SAVE_MODE_OVERWRITE)),
proto.Command
.newBuilder()
@@ -300,7 +300,7 @@ class SparkConnectServiceSuite extends SharedSparkSession
with MockitoSugar with
.setAvailableNow(true)
.setQueryName("test")
.setFormat("memory")
- .putOptions("checkpointLocation", s"${UUID.randomUUID}")
+ .putOptions("checkpointLocation",
Utils.createTempDir().getAbsolutePath)
.setPath("test-path")
.build()),
proto.Command
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]