处理数据库升级单元测试在低版本手机上不正常的问题 - #72
Merged
Merged
Conversation
SheepYang1993
pushed a commit
to SheepYang1993/Shadow
that referenced
this pull request
Jul 31, 2019
处理数据库升级单元测试在低版本手机上不正常的问题
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.
之前在4.4手机上运行DbCompatibilityTest一直会报错找不到java.lang.Process#waitFor(long, java.util.concurrent.TimeUnit)方法。但是修复之后还是不能正常运行。
经测试发现,Android 4.4手机的sqlite有bug,不能正常用sqlite3 init命令初始化数据库。
后又想兼容更高版本的手机,发现前面说的bug一直到API25都存在。API25中dump出的sql格式又和API28有小差别。而这个单元测试是基于dump出的sql纯文本比较的,因此兼容不同版本sqlite dump出的内容又很麻烦。
因此决定这个单元测试只在Android P上执行。