Github user steveloughran commented on the issue:
https://github.com/apache/spark/pull/19885
I'd recommend the tests are parameterized, generating a separate test for
each URI pair, and including the values on a failure. Plan for a future where
all you have is a stack trace from jenkins and you want to work out what failed.
Because Scalatest's `test(name: String)(testFun: => Any)` is not a function
definition, just a method which registers a test, you can apply it to a
sequence of path pairs, so generate a unique test for each one, something like
```scala
val matching = Seq(
("files", "file:///file1", "file:///file2"),
("hdfs", "hdfs:/path1", "hdfs:/path1")
)
matching.foreach {
t =>
test(t._1) {
assert(Client.compareUri(new URI(t._2), new URI(t._3)),
s"No match between ${t.2} and ${t._3}")
}
}
```
+same for non-matching sets, asserting that the comparison is false
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]