Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/1820#discussion_r15973012
--- Diff: core/src/main/scala/org/apache/spark/TestUtils.scala ---
@@ -111,4 +111,18 @@ private[spark] object TestUtils {
assert(out.exists(), "Destination file not moved: " +
out.getAbsolutePath())
out
}
+
+ /**
+ * Find a free port to bind to. There is a potential race condition
where this method could
+ * return a port number, but the calling method may not have bound to
the port yet - but some
+ * other process may have grabbed the same port, in which case this
method must be called again
+ * to get a new free port.
+ */
+ def findFreePort(): Int = {
--- End diff --
Yeah, it might be a good idea to remove this if we don't use it anymore,
since this is somewhat hacky and is subject to a race condition. We can always
add it back later if we find a need for it (my hopes is that we won't).
---
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]