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

Comment & Delete Test is unstable #12

Open
AE9999 opened this issue Dec 5, 2013 · 1 comment
Open

Comment & Delete Test is unstable #12

AE9999 opened this issue Dec 5, 2013 · 1 comment

Comments

@AE9999
Copy link

AE9999 commented Dec 5, 2013

Running the testsuite results in periodic failures of the below kind.


T E S T S

Running TestSuite
Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 64.591 sec <<< FAILURE! - in TestSuite
commentAndDelete(com.cd.reddit.RedditTest) Time elapsed: 0.308 sec <<< FAILURE!
java.lang.NullPointerException: null
at com.cd.reddit.RedditTest.commentAndDelete(RedditTest.java:279)

Results :

Failed tests:
RedditTest.commentAndDelete:279 NullPointer

Tests run: 11, Failures: 1, Errors: 0, Skipped: 0

@corydissinger
Copy link
Owner

If you run the test suite frequently, the Reddit API may throttle you since you are making many requests in a relatively short period of time. Even though it follows the one request per two second rule, the requests are very repetitive and the Reddit API does not like that.

This is still an issue though, because a NullPointerException is not an acceptable way to handle this scenario. I think the most sensible place to handle this scenario is when we parse the JSON message in RedditJsonParser

If you could get a copy of the JSON response that you recieve from the API and post it in this issue, that would be excellent.

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

No branches or pull requests

2 participants