Correct a SQLite unit test
The unit test that is supposed to test read-only transactions is missing the transaction. This test was cloned from the CTS test; the CTS test is correct. The read-only transaction was dropped for some reason. The failure rate of this test is pretty low. If the read operations completed before the write transaction was committed, then the test passed. Rarely, the test would fail in local testing. The change was verified by injecting a 1s sleep in the reader routine, after the routine advanced past the Phaser but before the routine read from the database. That change ensured that the write transaction would be committed before the last read operation, and the reader routine would throw. Bug: 319435199 Test: atest * FrameworksCoreTests:android.database Change-Id: I54d89508d3e6907ff53dd04dadb1d2c1815c276f
Loading
Please register or sign in to comment