szeiger commented on a change in pull request #32315:
URL: https://github.com/apache/spark/pull/32315#discussion_r621080603
##########
File path: core/src/test/scala/org/apache/spark/SparkFunSuite.scala
##########
@@ -119,6 +121,26 @@ abstract class SparkFunSuite
file
}
+ /**
+ * Get a Path relative to the project. It is assumed that tests are executed
+ * from the project's root directory, so the returned path is simply a
relative
+ * path composed of the given elements.
+ */
+ protected final def getProjectFilePath(first: String, more: String*): Path =
{
+ java.nio.file.Paths.get(first, more: _*)
+ }
+
+ /**
+ * Get a Path relative to the root project. It is assumed that a spark home
is set.
+ */
+ protected final def getWorkspaceFilePath(first: String, more: String*): Path
= {
Review comment:
It's not relative vs absolute, but relative to the subproject vs
relative to the root project in sbt terms. I'm not sure what the clearest terms
for Maven would be. Ideally we would only have one of these methods that is
used by all tests.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]