We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Request6ProgressKtTest.testProgress failed with this:
Wrong intermediate result after 3200: expected:<[User(login=user-2, contributions=50), User(login=user-1, contributions=50)]> but was:<[User(login=user-1, contributions=50), User(login=user-2, contributions=50)]> Expected :[User(login=user-2, contributions=50), User(login=user-1, contributions=50)] Actual :[User(login=user-1, contributions=50), User(login=user-2, contributions=50)]
intro-coroutines/src/tasks/Aggregation.kt
Line 20 in c51a403
.sortedWith(compareByDescending<User> { it.contributions } .thenByDescending { it.login })
This is my solution for Request6Progress.kt:
suspend fun loadContributorsProgress( service: GitHubService, req: RequestData, updateResults: suspend (List<User>, completed: Boolean) -> Unit ) { val repos = service .getOrgRepos(req.org) .also { logRepos(req, it) } .body() ?: listOf() var allUsers = emptyList<User>() repos.forEachIndexed { index, repo -> val users = service .getRepoContributors(req.org, repo.name) .also { logUsers(repo, it) } .bodyList() allUsers += users // allUsers = (allUsers + users).aggregate() // uncomment this line to make the test happy updateResults(allUsers.aggregate(), index == repos.lastIndex) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Request6ProgressKtTest.testProgress failed with this:
intro-coroutines/src/tasks/Aggregation.kt
Line 20 in c51a403
.sortedWith(compareByDescending<User> { it.contributions } .thenByDescending { it.login })
This is my solution for Request6Progress.kt:
The text was updated successfully, but these errors were encountered: