You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/01/03 22:13:01 UTC
[GitHub] vanzin commented on a change in pull request #23441:
[SPARK-26349][PYSPARK] Forbid insecure py4j gateways
vanzin commented on a change in pull request #23441: [SPARK-26349][PYSPARK] Forbid insecure py4j gateways
URL: https://github.com/apache/spark/pull/23441#discussion_r245150292
##########
File path: python/pyspark/tests/test_context.py
##########
@@ -246,6 +247,20 @@ def test_startTime(self):
with SparkContext() as sc:
self.assertGreater(sc.startTime, 0)
+ def test_forbid_insecure_gateway(self):
+ # Fail immediately if you try to create a SparkContext
+ # with an insecure gateway
+ gateway = _launch_gateway(insecure=True)
Review comment:
This test seems to be just for the check you're adding in the `SparkContext` python class, right?
So instead of this `insecure` flag, couldn't you just instantiate a dummy insecure gateway? Then the Java and Python code could be a little simpler and avoid the test-only checks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org