squito commented on a change in pull request #23540: [SPARK-26615][Core] Fixing
transport server/client resource leaks in the core unittests
URL: https://github.com/apache/spark/pull/23540#discussion_r247723645
##########
File path: core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala
##########
@@ -140,18 +138,8 @@ class BlockManagerSuite extends SparkFunSuite with
Matchers with BeforeAndAfterE
override def afterEach(): Unit = {
try {
conf = null
- if (store != null) {
- store.stop()
- store = null
- }
- if (store2 != null) {
- store2.stop()
- store2 = null
- }
- if (store3 != null) {
- store3.stop()
- store3 = null
- }
+ allStores.foreach(_.stop())
+ allStores.clear()
Review comment:
Ok I do see that now `allStores` is getting automaticaly updated in
`makeBlockManager` to make it easier to make sure you catch all of them, but I
also still don't see a leak from the old version
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]