This is an automated email from the ASF dual-hosted git repository.
philo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 056d0e3203 [CORE] ComponentSuite: Add a test case against dependency
cycles (#11008)
056d0e3203 is described below
commit 056d0e32034c367764d58a514a73fc9126b78862
Author: Hongze Zhang <[email protected]>
AuthorDate: Wed Nov 5 07:53:12 2025 +0000
[CORE] ComponentSuite: Add a test case against dependency cycles (#11008)
---
.../apache/gluten/component/ComponentSuite.scala | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git
a/gluten-core/src/test/scala/org/apache/gluten/component/ComponentSuite.scala
b/gluten-core/src/test/scala/org/apache/gluten/component/ComponentSuite.scala
index ca705b8f16..9abdc6b093 100644
---
a/gluten-core/src/test/scala/org/apache/gluten/component/ComponentSuite.scala
+++
b/gluten-core/src/test/scala/org/apache/gluten/component/ComponentSuite.scala
@@ -76,6 +76,32 @@ class ComponentSuite extends AnyFunSuite with
BeforeAndAfterAll {
a.ensureRegistered()
assert(Component.sorted().filter(Seq(a, c).contains(_)) === Seq(a, c))
}
+
+ test("Dependency cycle") {
+ val a = new DummyComponent("A") {}
+ val b = new DummyComponent("B") {}
+ val c = new DummyComponent("C") {}
+ val d = new DummyComponent("D") {}
+ val e = new DummyComponent("E") {}
+
+ // Cycle: b -> c -> d.
+ d.dependsOn(c)
+ c.dependsOn(b)
+ b.dependsOn(d)
+
+ b.dependsOn(a)
+ e.dependsOn(a)
+
+ a.ensureRegistered()
+ b.ensureRegistered()
+ c.ensureRegistered()
+ d.ensureRegistered()
+ e.ensureRegistered()
+
+ assertThrows[UnsupportedOperationException] {
+ Component.sorted()
+ }
+ }
}
object ComponentSuite {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]