You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "philo-he (via GitHub)" <gi...@apache.org> on 2026/10/13 17:21:13 UTC
Re: [PR] [GLUTEN-13222][VL] Fix race in WithQueryPlanListener causing flaky NPE [gluten]
philo-he commented on code in PR #13250:
URL: https://github.com/apache/gluten/pull/13250#discussion_r4261795045
##########
gluten-substrait/src/test/scala/org/apache/spark/sql/WithQueryPlanListener.scala:
##########
@@ -63,10 +67,18 @@ trait WithQueryPlanListener extends SharedSparkSession with AnyFunSuiteLike {
}
override def afterEach(): Unit = {
- listeners().foreach(listener => spark.sessionState.listenerManager.unregister(listener))
- super.afterEach()
+ // Let any in-flight notifications finish before unregistering, e.g. when the test failed.
+ try waitForListenerBus()
Review Comment:
Nit:
Could you add curly braces around try, even for one statement? It should be the community's preferred code style.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org