rtyler no longer has 50 people he follows

This commit is contained in:
Kohsuke Kawaguchi
2018-11-06 08:35:48 -08:00
parent a380059389
commit 40f012b03c

View File

@@ -14,17 +14,17 @@ public class UserTest extends AbstractGitHubApiTestBase {
public void listFollowsAndFollowers() throws IOException {
GHUser u = gitHub.getUser("rtyler");
assertNotEquals(
count50(u.listFollowers()),
count50(u.listFollows()));
count30(u.listFollowers()),
count30(u.listFollows()));
}
private Set<GHUser> count50(PagedIterable<GHUser> l) {
private Set<GHUser> count30(PagedIterable<GHUser> l) {
Set<GHUser> users = new HashSet<GHUser>();
PagedIterator<GHUser> itr = l.iterator();
for (int i=0; i<50 && itr.hasNext(); i++) {
for (int i=0; i<30 && itr.hasNext(); i++) {
users.add(itr.next());
}
assertEquals(50, users.size());
assertEquals(30, users.size());
return users;
}
}