Skip to content

Conversation

@aaronlevin
Copy link

It would be nice if complete-topology allowed a user to pass in the default timeout as a parameter (rather than just setting it as 5000ms). I had a test that kept failing by taking too long.

This PR adds functionality without breaking any existing code. Tests pass.

JIRA ticket: https://issues.apache.org/jira/browse/STORM-354

It would be nice if `complete-topology` allowed a usere to pass in
the default timeout as a parameter. This PR adds functionality without
breaking any existing code. Tests pass.
@revans2
Copy link
Contributor

revans2 commented Jun 4, 2014

All pull requests need a JIRA associated with them. Could you please file a JIRA if one does not already exist and update the title of this pull request to have the JIRA number in it, i.e. STORM-12345.

The code itself looks fine to me. But I would almost rather have a second defined timeout that is based off of the original timeout. Simply because in complete-topology simulate-wait within a loop. simulate-wait also has the same timeout code in it but in a loop 10 times, so if you get unlucky and get close to the timeout even once in simulate-wait the outer loop will timeout. We could simply have it be 3 * TEST-TIMEOUT-MS

@d2r
Copy link

d2r commented Jun 12, 2014

@weirdcanada, any update on this PR?

@aaronlevin
Copy link
Author

I just got back from vacation last week. I'll submit the JIRA ticket and update the PR tomorrow (Sunday). Thanks!

@aaronlevin
Copy link
Author

@revans2 I've created the JIRA ticket and updated the pull request. Let me take into account your feedback and re-submit a pull request. It may be a couple of days.

@aaronlevin aaronlevin changed the title Testing: allow users to pass TEST-TIMEOUT-MS as param for complete-topology STORM-354: Testing: allow users to pass TEST-TIMEOUT-MS as param for complete-topology Jun 17, 2014
@nsj007
Copy link

nsj007 commented Jul 8, 2014

Is there any progress on this. The 5000ms timeout pretty much fails all my test when upgrading from STORM 0.9.01 to apache-storm-0.9.2-incubator

@revans2
Copy link
Contributor

revans2 commented Jul 18, 2014

I am really sorry it has taken me so long to review things. The changes look good I am +1, I had to do an upmerge, because of whitespace issues due to a reformatting patch that went in previously.

I'll merge this into master

@vkaggalumn
Copy link

Hello!
I am also wondering on how to set this parameter in java? Would somebody comment please?

Thanks

@revans2
Copy link
Contributor

revans2 commented Jan 20, 2015

https://github.com/apache/storm/blob/master/storm-core/src/clj/backtype/storm/testing.clj#L190-192

Shows that the environment variable STORM_TEST_TIMEOUT_MS, can be used to set the value globally. We probably should document this better somewhere.

@harshach
Copy link
Contributor

@revans2
Copy link
Contributor

revans2 commented Jan 20, 2015

So it is. I guess I should read the documentation before I start digging though the code :) Thanks @harshach

@vkaggalumn
Copy link

Thanks @harshach.

If I am reading the documentation right, I see the following which instructs how to build the storm code base with the STORM_TEST_TIMEOUT_MS set? Being a new user, I am wondering about the this - How should we be setting this (STORM_TEST_TIMEOUT_MS) when using Eclipse to run our tests in our storm project? Or am I not reading this right?

# Build the code and run the tests, with specifying default test timeout (in millisecond)
$ export STORM_TEST_TIMEOUT_MS=10000
$ mvn clean install

Any pointers would be greatly appreciated.

Many thanks!

@harshach
Copy link
Contributor

@vkaggalumn I don't think we tested that part of dev cycle. Its definitely a valid use case. Most of the time storm tests timeout in a build env for unit tests when a user running all the test suite.
I just poked around eclipse you can add Environment variable under Run configurations for a project or set a system wide environment variable for STORM_TEST_TIMEOUT_MS.

@vkaggalumn
Copy link

@harshach Sorry for the delay in my response.

Thanks for your response. I had already tried to pass STORM_TEST_TIMEOUT_MS at runtime (Run Configuration-> environment) which did not seem to work. However, I will double check, try again.

Thanks for your help.

knusbaum pushed a commit to knusbaum/incubator-storm that referenced this pull request Feb 11, 2015
Sync maven POM with correct conjure version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants