summaryrefslogtreecommitdiffstats
path: root/container-di/src/test/scala/com/yahoo/container/di/ContainerTest.scala
diff options
context:
space:
mode:
Diffstat (limited to 'container-di/src/test/scala/com/yahoo/container/di/ContainerTest.scala')
-rw-r--r--container-di/src/test/scala/com/yahoo/container/di/ContainerTest.scala16
1 files changed, 15 insertions, 1 deletions
diff --git a/container-di/src/test/scala/com/yahoo/container/di/ContainerTest.scala b/container-di/src/test/scala/com/yahoo/container/di/ContainerTest.scala
index 31c0f787269..d8f3d0fc2ab 100644
--- a/container-di/src/test/scala/com/yahoo/container/di/ContainerTest.scala
+++ b/container-di/src/test/scala/com/yahoo/container/di/ContainerTest.scala
@@ -4,7 +4,7 @@ package com.yahoo.container.di
import com.yahoo.container.di.componentgraph.core.ComponentGraphTest.{SimpleComponent, SimpleComponent2}
import com.yahoo.container.di.componentgraph.Provider
import com.yahoo.container.di.componentgraph.core.{ComponentGraph, Node}
-import org.junit.{After, Before, Test}
+import org.junit.{After, Before, Ignore, Test}
import org.junit.Assert._
import org.hamcrest.CoreMatchers._
import com.yahoo.config.test.TestConfig
@@ -118,6 +118,20 @@ class ContainerTest {
assertTrue(componentToDestruct.deconstructed)
}
+ @Ignore
+ @Test
+ def manually_verify_what_happens_when_first_graph_contains_component_that_throws_exception_in_ctor() {
+ writeBootstrapConfigs("thrower", classOf[ComponentThrowingExceptionInConstructor])
+ val container = newContainer(dirConfigSource)
+ var currentGraph: ComponentGraph = null
+ try {
+ currentGraph = container.runOnce()
+ fail("Expected to log and die.")
+ } catch {
+ case _: Throwable => fail("Expected to log and die")
+ }
+ }
+
@Test
def previous_graph_is_retained_when_new_graph_contains_component_that_throws_exception_in_ctor() {
val simpleComponentEntry = ComponentEntry("simpleComponent", classOf[SimpleComponent])