diff options
author | gjoranv <gv@yahoo-inc.com> | 2017-05-31 11:18:41 +0200 |
---|---|---|
committer | gjoranv <gv@yahoo-inc.com> | 2017-05-31 11:18:41 +0200 |
commit | 77ddf302a8f3ad82ff0eb2d0ef75a4b8f112785f (patch) | |
tree | 7f942bb1ab3545291d0d3c2ddf58fa506eee0726 /container-di/src/test/scala/com/yahoo | |
parent | a66b8e55fc81ae2e60301a35503c21baaf24d0ae (diff) |
Remove the timeout for component construction.
Diffstat (limited to 'container-di/src/test/scala/com/yahoo')
-rw-r--r-- | container-di/src/test/scala/com/yahoo/container/di/ContainerTest.scala | 28 |
1 files changed, 0 insertions, 28 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 b7c3f94410b..9246f7e22c3 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 @@ -166,29 +166,6 @@ class ContainerTest { } @Test - def previous_graph_is_retained_when_new_graph_contains_component_that_times_out_in_ctor() { - ComponentNode.ComponentConstructTimeout = 1 second - val simpleComponentEntry = ComponentEntry("simpleComponent", classOf[SimpleComponent]) - - writeBootstrapConfigs(Array(simpleComponentEntry)) - val container = newContainer(dirConfigSource) - var currentGraph = container.runOnce() - - val simpleComponent = currentGraph.getInstance(classOf[SimpleComponent]) - - writeBootstrapConfigs("sleeper", classOf[ComponentThatSleepsInConstructor]) - container.reloadConfig(2) - try { - currentGraph = container.runOnce(currentGraph) - fail("Expected exception") - } catch { - case e: ComponentConstructorException => assertThat(e.getMessage, containsString("Timed out")) - case _: Throwable => fail("Expected ComponentConstructorException") - } - assertEquals(1, currentGraph.generation) - } - - @Test def previous_graph_is_retained_when_new_graph_throws_exception_for_missing_config() { val simpleComponentEntry = ComponentEntry("simpleComponent", classOf[SimpleComponent]) @@ -393,11 +370,6 @@ object ContainerTest { fail("This component should never be created. Only used for tests where 'int' config is missing.") } - class ComponentThatSleepsInConstructor() { - Thread.sleep(3 * ComponentNode.ComponentConstructTimeout.toMillis) - fail("The timeout mechanism for constructing components is broken.") - } - class DestructableComponent extends AbstractComponent { var deconstructed = false override def deconstruct() { |