Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent duplicate long_tests from being registered #1962

Merged
merged 1 commit into from
Jun 13, 2017
Merged

Conversation

SeanTAllen
Copy link
Member

Currently it is possible to call long_test more than once for a given
test. This results in more than 1 timer being registered, however, we
only keep track of 1 of timers registered so when the test is completed,
all timers are not cancelled and tests will continue "to run" until the
timer finishes.

This PR prevents duplicate long tests from being registered by only
setting up a long test if one hasn't already been registered. If one is
already registered, we skip the normal setup procedure and log a
warning.

Currently it is possible to call `long_test` more than once for a given
test. This results in more than 1 timer being registered, however, we
only keep track of 1 of timers registered so when the test is completed,
all timers are not cancelled and tests will continue "to run" until the
timer finishes.

This PR prevents duplicate long tests from being registered by only
setting up a long test if one hasn't already been registered. If one is
already registered, we skip the normal setup procedure and log a
warning.
@SeanTAllen
Copy link
Member Author

I've managed to been bit by the problem more than once. I doubt I would be the only one. Today it took me 45 minutes to track down the problem. I think this small change will save folks a ton of time.

@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Jun 13, 2017
@jemc jemc merged commit 55236a0 into master Jun 13, 2017
ponylang-main added a commit that referenced this pull request Jun 13, 2017
@SeanTAllen SeanTAllen deleted the duplicate-long-tests branch June 7, 2018 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants