Closed
Conversation
Member
|
I tried fixing tests in #180, but I needed some feedback to continue... can you provide some, please? ;-) |
Stypox
requested changes
Nov 5, 2019
| // Only test if subscribers count is available in the search page | ||
| if (subscriberCount != -1) { | ||
| assertTrue("Count does not fit: " + Long.toString(subscriberCount), | ||
| 69043316 < subscriberCount && subscriberCount < 103043316); |
Member
There was a problem hiding this comment.
This is going to start failing because PewDiePie will soon have more that 103,043,316 subscribers (currently he has 102M).
Using this we should be safe for the next 10 years: ;-)
Suggested change
| 69043316 < subscriberCount && subscriberCount < 103043316); | |
| 100000000 < subscriberCount && subscriberCount < 300000000); |
Member
|
This pr should be closed in favour of #234, where the entire YoutubeSearchCountTest class is removed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests should be refactored as soon as possible. I mean look at their state, it's sad, really.
For example, from time to time (read often) we get rate limited and receive a 500 status from SoundCloud, we should implement retry and back off in the downloader used in tests. They are very brittle in the current state, and yes, we should expect them to be because we don't control the source, but we can at least improve the situation.
This is just a temporary quick fix.