Copilot commented on code in PR #12512:
URL: https://github.com/apache/gluten/pull/12512#discussion_r3586047963
##########
gluten-ut/common/src/test/scala/org/apache/gluten/utils/BackendTestSettings.scala:
##########
@@ -42,18 +46,28 @@ abstract class BackendTestSettings {
suiteSettings
}
+ protected def disableSuite[T: ClassTag](reason: String): Unit = {
+ disableSuite(implicitly[ClassTag[T]].runtimeClass.getCanonicalName, reason)
+ }
+
+ protected def disableSuite(suiteName: String, reason: String): Unit = {
+ require(reason.nonEmpty, "Disable reason must not be empty")
+ if (enabledSuites.containsKey(suiteName)) {
+ throw new IllegalArgumentException("Suite is already enabled: " +
suiteName)
+ }
Review Comment:
`disableSuite` requires a non-empty `reason` and stores it in
`disabledSuites`, but that reason is never read or exposed anywhere (the map is
only checked via `containsKey`). As a result, callers are forced to provide a
reason that can't be surfaced for reporting/debugging. Consider either (a)
exposing the disabled-suite reasons via a `private[utils]` accessor (so
CI/reporting can consume it), or (b) dropping the `reason` parameter until it
is used.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]