Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
tdas committed May 26, 2018
1 parent ac0270a commit 52610e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 52610e3

Please sign in to comment.