From 52610e3a9e5868549da4910e36aec05714037922 Mon Sep 17 00:00:00 2001 From: Tathagata Das Date: Fri, 25 May 2018 17:27:10 -0700 Subject: [PATCH] Fixed test --- python/pyspark/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyspark/tests.py b/python/pyspark/tests.py index 6fd04978a1a58..2b55f4e3a8dbf 100644 --- a/python/pyspark/tests.py +++ b/python/pyspark/tests.py @@ -547,9 +547,9 @@ def test_get_local_property(self): """Verify that local properties set on the driver are available in TaskContext.""" self.sc.setLocalProperty("testkey", "testvalue") rdd = self.sc.parallelize(range(1), 1) - prop1 = rdd1.map(lambda x: TaskContext.get().getLocalProperty("testkey")).collect()[0] + prop1 = rdd.map(lambda x: TaskContext.get().getLocalProperty("testkey")).collect()[0] self.assertEqual(prop1, "testkey") - prop2 = rdd1.map(lambda x: TaskContext.get().getLocalProperty("otherkey")).collect()[0] + prop2 = rdd.map(lambda x: TaskContext.get().getLocalProperty("otherkey")).collect()[0] self.assertTrue(prop2 is None) class RDDTests(ReusedPySparkTestCase):