Regression - no results when using an existing database

Bug #1177357 reported by Kevin Wright on 2013-05-07
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Christian Dywan

Bug Description

The issue: U1db-qt does not produce results when using an existing database -- demonstrated with u1db-qt-example-5.qml

Expected results: Display 6 records in a ListView

Steps to reproduce:

1. bzr branch lp:u1db-qt
2. cd u1db-qt
3. cmake -G "Unix Makefiles"
4. make
5. sudo make install
6. cd examples/u1db-qt-example-5
7. qmlscene u1db-qt-example-5.qml
8. Produces 6 results as expected
9. Close qmlscene
10. qmlscene u1db-qt-example-5.qml (second time)
11. Produces 0 results
12. rm aDatabase (database file created in step #7)
12. qmlscene u1db-qt-example-5.qml (third time)
13. Produces 6 results as expected

It appears to relate to recent changes in the source of Index and Query, which have been modified considerably in the applicable areas.

Since this problem happens when there is an existing database, all tests should be run at least twice rather than only once (when there is no database before running the tests the first time), because the first run will produce a database that can then be used on the second run.

Related branches

summary: - Regression - U1db-qt does not produce results when using an existing
- database
+ Regression - no results when using an existing database
Changed in u1db-qt:
status: New → Confirmed
Christian Dywan (kalikiana) wrote :

I'm experimenting the best way to test with an existing database in the tests, such as a "data" function (see Unfortunately I'm hitting QML crashes there (the -platform business isn't terribly robust) so not sure yet if this is the best option.

Meanwhile I reproduced unexpected failures by simply using a temporary file instead of in-memory, which may be related.

Christian Dywan (kalikiana) wrote :

Long story short, I struggled to use the fancy API to improve the tests; for now, hard-coding a local filename does the job and reproduces the issue in the test and verifies the fix. The branch includes Kevin's fix.

Fix committed into lp:u1db-qt at revision 89, scheduled for release in u1db-qt, milestone 0.33

Changed in u1db-qt:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers