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):