Unit tests and fixes.

Fixed issue with getCodeFrequency() where it would occasionally throw
an exception when the statistics were still being generated.

Added comment about throwing an exception as a possibility when
202 is returned.
This commit is contained in:
Martin van Zijl
2019-09-04 14:43:59 +12:00
parent 9d955d252a
commit ad281adc97
3 changed files with 113 additions and 13 deletions

View File

@@ -626,6 +626,7 @@ class Requester {
// See https://developer.github.com/v3/repos/statistics/#a-word-about-caching
if (responseCode == 202) {
LOGGER.log(INFO, "The statistics are still being generated. Please try again in 5 seconds.");
// Maybe throw an exception instead?
return null;
}