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. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to