diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-10-07 15:08:24 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-07 15:08:24 -0700 |
commit | 270928bd4a1db1dc0d989f4e9897a81ab865e30e (patch) | |
tree | f9188005feb5a9756922f584d40cdc38bf9103ce /core/tests | |
parent | 4cc8bafb4b10614dc881ed8121ce4754811e161d (diff) | |
parent | 715311fa5aeb39fd0904209e1428a3656c721c3d (diff) | |
download | frameworks_base-270928bd4a1db1dc0d989f4e9897a81ab865e30e.zip frameworks_base-270928bd4a1db1dc0d989f4e9897a81ab865e30e.tar.gz frameworks_base-270928bd4a1db1dc0d989f4e9897a81ab865e30e.tar.bz2 |
Merge changes Idbfeb3cc,I03e8e2e7,Iff9eed78
* changes:
Fix regression in CursorWindow.getString() Bug: 5332296
Clean up CursorWindow lifetime. Bug: 5332296
Fix regression in CursorWindow.copyStingToBuffer. Bug: 5332296
Diffstat (limited to 'core/tests')
-rw-r--r-- | core/tests/coretests/src/android/database/DatabaseCursorTest.java | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/core/tests/coretests/src/android/database/DatabaseCursorTest.java b/core/tests/coretests/src/android/database/DatabaseCursorTest.java index d5b9ee6..179338d 100644 --- a/core/tests/coretests/src/android/database/DatabaseCursorTest.java +++ b/core/tests/coretests/src/android/database/DatabaseCursorTest.java @@ -290,110 +290,7 @@ public class DatabaseCursorTest extends AndroidTestCase implements PerformanceTe public void onInvalidated() { } } - - //@Large - @Suppress - public void testLoadingThreadDelayRegisterData() throws Exception { - mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);"); - - final int count = 505; - String sql = "INSERT INTO test (data) VALUES (?);"; - SQLiteStatement s = mDatabase.compileStatement(sql); - for (int i = 0; i < count; i++) { - s.bindLong(1, i); - s.execute(); - } - - int maxRead = 500; - int initialRead = 5; - SQLiteCursor c = (SQLiteCursor)mDatabase.rawQuery("select * from test;", - null, initialRead, maxRead); - - TestObserver observer = new TestObserver(count, c); - c.getCount(); - c.registerDataSetObserver(observer); - if (!observer.quit) { - Looper.loop(); - } - c.close(); - } - - //@LargeTest - @BrokenTest("Consistently times out") - @Suppress - public void testLoadingThread() throws Exception { - mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);"); - - final int count = 50000; - String sql = "INSERT INTO test (data) VALUES (?);"; - SQLiteStatement s = mDatabase.compileStatement(sql); - for (int i = 0; i < count; i++) { - s.bindLong(1, i); - s.execute(); - } - int maxRead = 1000; - int initialRead = 5; - SQLiteCursor c = (SQLiteCursor)mDatabase.rawQuery("select * from test;", - null, initialRead, maxRead); - - TestObserver observer = new TestObserver(count, c); - c.registerDataSetObserver(observer); - c.getCount(); - - Looper.loop(); - c.close(); - } - - //@LargeTest - @BrokenTest("Consistently times out") - @Suppress - public void testLoadingThreadClose() throws Exception { - mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);"); - - final int count = 1000; - String sql = "INSERT INTO test (data) VALUES (?);"; - SQLiteStatement s = mDatabase.compileStatement(sql); - for (int i = 0; i < count; i++) { - s.bindLong(1, i); - s.execute(); - } - - int maxRead = 11; - int initialRead = 5; - SQLiteCursor c = (SQLiteCursor)mDatabase.rawQuery("select * from test;", - null, initialRead, maxRead); - - TestObserver observer = new TestObserver(count, c); - c.registerDataSetObserver(observer); - c.getCount(); - c.close(); - } - - @LargeTest - public void testLoadingThreadDeactivate() throws Exception { - mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);"); - - final int count = 1000; - String sql = "INSERT INTO test (data) VALUES (?);"; - SQLiteStatement s = mDatabase.compileStatement(sql); - for (int i = 0; i < count; i++) { - s.bindLong(1, i); - s.execute(); - } - - int maxRead = 11; - int initialRead = 5; - SQLiteCursor c = (SQLiteCursor)mDatabase.rawQuery("select * from test;", - null, initialRead, maxRead); - - TestObserver observer = new TestObserver(count, c); - c.registerDataSetObserver(observer); - c.getCount(); - c.deactivate(); - c.close(); - } - @LargeTest public void testManyRowsLong() throws Exception { mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);"); |