-
Notifications
You must be signed in to change notification settings - Fork 59
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
优先选择偏好类型数据源,不需要等其他源查询完毕 #1002
优先选择偏好类型数据源,不需要等其他源查询完毕 #1002
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要增加测试, 当一个源完成后就立即选择
app/shared/app-data/src/commonMain/kotlin/data/source/media/fetch/MediaFetcher.kt
Outdated
Show resolved
Hide resolved
app/shared/app-data/src/commonMain/kotlin/data/source/media/fetch/MediaFetcher.kt
Outdated
Show resolved
Hide resolved
app/shared/app-data/src/commonMain/kotlin/data/source/media/fetch/MediaFetcher.kt
Outdated
Show resolved
Hide resolved
app/shared/app-data/src/commonMain/kotlin/data/source/media/selector/MediaSelector.kt
Outdated
Show resolved
Hide resolved
不清楚怎么测试,感觉比较难观察 hasCompleted 的变化 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, 但是需要有 test 确保以后不会 regress
需要测试:
- prefer BT 时, WEB 完成了, 应当继续等待
- prefer BT 时, BT 完成了, 应当自动选择
- prefer BT 时, 没有启用 BT 源, 会怎么样?
- prefer BT 时, 但 BT 没有搜到东西, 是什么行为?
- 没有 preferefence, BT 完成了但 web 没有完成, 应当继续等待
- 没有 preferefence, 都完成了, 自动选择 (应该是现有 case?)
test 中协程是单线程的, 你可以控制的 在数据源实现中, 用 |
resolve #816