Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/9812#discussion_r45419865
--- Diff:
repl/src/test/scala/org/apache/spark/repl/ExecutorClassLoaderSuite.scala ---
@@ -99,6 +107,32 @@ class ExecutorClassLoaderSuite
}
}
+ test("resource from parent") {
+ val parentLoader = new URLClassLoader(urls2, null)
+ val classLoader = new ExecutorClassLoader(new SparkConf(), url1,
parentLoader, true)
+ val resourceName: String = "fake-resource.txt"
+ Option(classLoader.getResource(resourceName)) match {
--- End diff --
I'd simplify this a bit.
val is = classLoader.getResourceAsStream(resourceName)
assert(is != null)
val content = Source.fromInputStream(is, "UTF-8").getLines().first
assert(content.contains(...))
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]