File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
core/src/test/scala/org/apache/spark/sql
hive/src/test/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
4646 }
4747
4848 def isMaterialized (rddId : Int ): Boolean = {
49- sparkContext.env.blockManager.get(RDDBlockId (rddId, 0 )).nonEmpty
49+ val maybeBlock = sparkContext.env.blockManager.get(RDDBlockId (rddId, 0 ))
50+ maybeBlock.foreach(_ => sparkContext.env.blockManager.release(RDDBlockId (rddId, 0 )))
51+ maybeBlock.nonEmpty
5052 }
5153
5254 test(" withColumn doesn't invalidate cached dataframe" ) {
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ class CachedTableSuite extends QueryTest with TestHiveSingleton {
4040 }
4141
4242 def isMaterialized (rddId : Int ): Boolean = {
43- sparkContext.env.blockManager.get(RDDBlockId (rddId, 0 )).nonEmpty
43+ val maybeBlock = sparkContext.env.blockManager.get(RDDBlockId (rddId, 0 ))
44+ maybeBlock.foreach(_ => sparkContext.env.blockManager.release(RDDBlockId (rddId, 0 )))
45+ maybeBlock.nonEmpty
4446 }
4547
4648 test(" cache table" ) {
You can’t perform that action at this time.
0 commit comments