[ 
https://issues.apache.org/jira/browse/STORM-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14222850#comment-14222850
 ] 

ASF GitHub Bot commented on STORM-492:
--------------------------------------

Github user javrasya commented on the pull request:

    https://github.com/apache/storm/pull/316#issuecomment-64173340
  
    @harshach , change is actually because of setting that timeout value in 
code simply. Environment variable can not be set in code. But property can be 
set.
    ```
    System.setProperty("stormTestTimeoutMs","5001")
    ```
    It was not for customising  that value on console which is passing 
`-DstormTestTimeoutMs=5001` parameter.
    
    Are you sure, you tested it well. Cause I tried it and I saw the timeout is 
changed to 5001. Here is my test;
    ```
    $ mvn -Dtest=net.egemsoft.lol.engine.storm.MainFlowTest#testMainFlow test
    .....
    Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 14.044 sec 
<<< FAILURE! - in net.egemsoft.lol.engine.storm.MainFlowTest
    testMainFlow(net.egemsoft.lol.engine.storm.MainFlowTest)  Time elapsed: 
13.934 sec  <<< FAILURE!
    java.lang.AssertionError: Test timed out (5001ms) (not (every? exhausted? 
(spout-objects spouts)))
        at backtype.storm.testing$complete_topology.doInvoke(testing.clj:501)
        at clojure.lang.RestFn.invoke(RestFn.java:826)
        at backtype.storm.testing4j$_completeTopology.invoke(testing4j.clj:61)
        at backtype.storm.Testing.completeTopology(Unknown Source)
        at 
net.egemsoft.lol.engine.storm.MainFlowTest$1.run(MainFlowTest.java:147)
        at 
backtype.storm.testing4j$_withSimulatedTimeLocalCluster$fn__9107.invoke(testing4j.clj:93)
        at 
backtype.storm.testing4j$_withSimulatedTimeLocalCluster.invoke(testing4j.clj:93)
        at backtype.storm.Testing.withSimulatedTimeLocalCluster(Unknown Source)
        at 
net.egemsoft.lol.engine.storm.MainFlowTest.testMainFlow(MainFlowTest.java:77)
    
    
    Results :
    
    Failed tests:
      MainFlowTest.testMainFlow:77 Test timed out (5001ms) (not (every? 
exhausted? (spout-objects spouts)))
    
    Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
    ```
    
    @HeartSaVioR, my project is in Java. I could not access 
`wait-until-cluster-waiting` function. Because it is in `testing.clj` and my 
project is probably using `testing4j.clj`. I looked to all code in 
`testing4j.clj` there is no access to `wait-until-cluster-waiting`. I think 
there is no need to access that function neihter. 
    
    I invoke `complete-topology`. I see the function takes `timeout-ms` 
parameter. It can be given as parameter. But as I mentioned above, I am using 
testing4j.clj result and the `complete-topology` function in `testing4j.clj`, 
does not accept `timeout-ms` parameter. Please check it in `testing4j.clj`. 
    
    So there is only way left I can see, `TEST_TIMEOUT_MS` variable should also 
be fed by system property. 



> Test timeout should be configurable
> -----------------------------------
>
>                 Key: STORM-492
>                 URL: https://issues.apache.org/jira/browse/STORM-492
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: Devika Nair
>            Assignee: Jungtaek Lim
>              Labels: newbie
>             Fix For: 0.9.3-rc2
>
>
> Test timeout is hard coded to 5000ms in 
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/testing.clj.
>  Provide a way to override this value in order to handle longer running tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to