Thanks Taylor. I have created a JIRA <https://issues.apache.org/jira/browse/STORM-492>. I do not have experience with clojure, so I was wondering if I could override this value, even if the method is not very straightforward like changing it using reflection.
On Mon, Sep 8, 2014 at 4:50 PM, P. Taylor Goetz <[email protected]> wrote: > We should change the fact that it is hard coded. I'd rather see it look > for a system property (with a default value). That way it can be overridden > easily, for example in resource-constrained environments (e.g. Jenkins). > > Feel free to open a JIRA ticket for this. I'd be happy to do it as well. > > -Taylor > > On Sep 8, 2014, at 4:31 PM, Devika Nair <[email protected]> wrote: > > I can see that the test time out is set to 5000ms in > https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/testing.clj. > Is there anyway to override this value? > > On Mon, Sep 8, 2014 at 1:39 PM, Devika Nair <[email protected]> > wrote: > >> Hi all, >> >> >> I am trying to follow the example on >> https://github.com/xumingming/storm-lib/blob/master/src/jvm/storm/TestingApiDemo.java >> and writing tests for my topology. >> >> >> However, my tests(similar to testBasicTopology()) fail due to timeout >> when I add a bolt(the prepare for this bolt takes quite long). Is there any >> way to increase the timeout? I have been looking around, but unable to find >> any. If I send my spout data to TestWordCounter it works. >> >> >> >> THIS WORKS >> public void run(ILocalCluster cluster) { // build the test topology >> TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("1", >> new MySpout(true), 1); builder.setBolt("2", new TestWordCounter(), 1 >> ).shuffleGrouping("1"); >> >> THIS DOES NOT WORK >> public void run(ILocalCluster cluster) { // build the test topology >> TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("1", >> new MySpout(true), 1); builder.setBolt("2", new MyBolt(), 1 >> ).shuffleGrouping("1"); >> >> >> Exception: >> >> java.lang.AssertionError: Test timed out (5000ms) >> >> at >> backtype.storm.testing$complete_topology.doInvoke(testing.clj:454) >> ~[storm-core-0.9.0.1.jar:na] >> >> at clojure.lang.RestFn.invoke(*RestFn.java:826*) >> ~[clojure-1.4.0.jar:na] >> >> at >> backtype.storm.testing4j$_completeTopology.invoke(testing4j.clj:45) >> ~[storm-core-0.9.0.1.jar:na] >> >> at backtype.storm.Testing.completeTopology(Unknown Source) >> [storm-core-0.9.0.1.jar:na] >> >> at analytics.AAMTopologyTest$1.run(*AAMTopologyTest.java:162*) >> ~[test-classes/:na] >> >> at >> backtype.storm.testing4j$_withSimulatedTimeLocalCluster$fn__7112.invoke(testing4j.clj:75) >> [storm-core-0.9.0.1.jar:na] >> >> at >> backtype.storm.testing4j$_withSimulatedTimeLocalCluster.invoke(testing4j.clj:75) >> [storm-core-0.9.0.1.jar:na] >> >> at backtype.storm.Testing.withSimulatedTimeLocalCluster(Unknown >> Source) [storm-core-0.9.0.1.jar:na] >> >> at analytics.AAMTopologyTest.testBasicTopology( >> *AAMTopologyTest.java:90*) [test-classes/:na] >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*) >> ~[na:1.7.0_65] >> >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> ~[na:1.7.0_65] >> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown >> Source) ~[na:1.7.0_65] >> >> at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_65] >> >> at junit.framework.TestCase.runTest(*TestCase.java:168*) >> [junit-4.8.2.jar:na] >> >> at junit.framework.TestCase.runBare(*TestCase.java:134*) >> [junit-4.8.2.jar:na] >> >> at junit.framework.TestResult$1.protect(*TestResult.java:110*) >> [junit-4.8.2.jar:na] >> >> >> Thanks, >> >> Devika >> >> >> >
