Skip to content

处理数据库升级单元测试在低版本手机上不正常的问题 - #72

Merged
shifujun merged 2 commits into
Tencent:devfrom
shifujun:fix_db_test
Jul 26, 2019
Merged

处理数据库升级单元测试在低版本手机上不正常的问题#72
shifujun merged 2 commits into
Tencent:devfrom
shifujun:fix_db_test

Conversation

@shifujun

Copy link
Copy Markdown
Collaborator

之前在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上执行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant