Merge lp:~vthompson/music-app/patch-mediascanner-db-ap-tests into lp:music-app/trusty

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 603
Merged at revision: 602
Proposed branch: lp:~vthompson/music-app/patch-mediascanner-db-ap-tests
Merge into: lp:music-app/trusty
Diff against target: 55 lines (+18/-16)
1 file modified
tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sql (+18/-16)
To merge this branch: bzr merge lp:~vthompson/music-app/patch-mediascanner-db-ap-tests
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+232337@code.launchpad.net

Commit message

Fix tests for new mediascanner schema.

Description of the change

This steps up the sqlite database used for the Autopilot tests to confirm with the new schema that mediascanner2.0 is using. This is required in order for the app to run while being controlled by Autopilot.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

There also appears to be some sort of GStreamer issue on the Jenkins instance, note this runs just fine on a Utopic desktop VM:

qml: Source: file:///home/victor/Music/1.ogg
qml: Index: 0
GStreamer; Unable to pause - "file:///home/victor/Music/1.ogg"
GStreamer; Unable to play - "file:///home/victor/Music/1.ogg"
qml: Debug: Queue: Now has: 3 tracks
Error: "Resource not found."
qml: currentIndex: 0
qml: trackQueue.count: 3
qml: Debug: MusicQueue update currentIndex: file:///home/victor/Music/1.ogg
qml: Source: file:///home/victor/Music/2.ogg
qml: Index: 1
GStreamer; Unable to pause - "file:///home/victor/Music/2.ogg"
GStreamer; Unable to play - "file:///home/victor/Music/2.ogg"
Error: "Resource not found."
GStreamer; Unable to play - "file:///home/victor/Music/2.ogg"
qml: currentIndex: 1
qml: trackQueue.count: 3
qml: Debug: MusicQueue update currentIndex: file:///home/victor/Music/2.ogg
qml: Source: file:///home/victor/Music/3.mp3
qml: Index: 2
GStreamer; Unable to pause - "file:///home/victor/Music/3.mp3"
GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
D-Bus error: "Could not get thumbnail"
Error: "Resource not found."
GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
Error: "No URI set"

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Its looking for files in /home/victor/Music/ not /home/phablet/Music/ not
an issue with gstreamer?

On 27 August 2014 01:07, Victor Thompson <email address hidden> wrote:

> There also appears to be some sort of GStreamer issue on the Jenkins
> instance, note this runs just fine on a Utopic desktop VM:
>
> qml: Source: file:///home/victor/Music/1.ogg
> qml: Index: 0
> GStreamer; Unable to pause - "file:///home/victor/Music/1.ogg"
> GStreamer; Unable to play - "file:///home/victor/Music/1.ogg"
> qml: Debug: Queue: Now has: 3 tracks
> Error: "Resource not found."
> qml: currentIndex: 0
> qml: trackQueue.count: 3
> qml: Debug: MusicQueue update currentIndex: file:///home/victor/Music/1.ogg
> qml: Source: file:///home/victor/Music/2.ogg
> qml: Index: 1
> GStreamer; Unable to pause - "file:///home/victor/Music/2.ogg"
> GStreamer; Unable to play - "file:///home/victor/Music/2.ogg"
> Error: "Resource not found."
> GStreamer; Unable to play - "file:///home/victor/Music/2.ogg"
> qml: currentIndex: 1
> qml: trackQueue.count: 3
> qml: Debug: MusicQueue update currentIndex: file:///home/victor/Music/2.ogg
> qml: Source: file:///home/victor/Music/3.mp3
> qml: Index: 2
> GStreamer; Unable to pause - "file:///home/victor/Music/3.mp3"
> GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
> D-Bus error: "Could not get thumbnail"
> Error: "Resource not found."
> GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
> GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
> Error: "No URI set"
> --
>
> https://code.launchpad.net/~vthompson/music-app/patch-mediascanner-db-ap-tests/+merge/232337
> Your team Music App Developers is requested to review the proposed merge
> of lp:~vthompson/music-app/patch-mediascanner-db-ap-tests into lp:music-app.
>

Revision history for this message
Victor Thompson (vthompson) wrote :

No, good catch.
On Aug 27, 2014 2:51 AM, "Andrew Hayzen" <email address hidden> wrote:

> Its looking for files in /home/victor/Music/ not /home/phablet/Music/ not
> an issue with gstreamer?
>
>
> On 27 August 2014 01:07, Victor Thompson <email address hidden>
> wrote:
>
> > There also appears to be some sort of GStreamer issue on the Jenkins
> > instance, note this runs just fine on a Utopic desktop VM:
> >
> > qml: Source: file:///home/victor/Music/1.ogg
> > qml: Index: 0
> > GStreamer; Unable to pause - "file:///home/victor/Music/1.ogg"
> > GStreamer; Unable to play - "file:///home/victor/Music/1.ogg"
> > qml: Debug: Queue: Now has: 3 tracks
> > Error: "Resource not found."
> > qml: currentIndex: 0
> > qml: trackQueue.count: 3
> > qml: Debug: MusicQueue update currentIndex:
> file:///home/victor/Music/1.ogg
> > qml: Source: file:///home/victor/Music/2.ogg
> > qml: Index: 1
> > GStreamer; Unable to pause - "file:///home/victor/Music/2.ogg"
> > GStreamer; Unable to play - "file:///home/victor/Music/2.ogg"
> > Error: "Resource not found."
> > GStreamer; Unable to play - "file:///home/victor/Music/2.ogg"
> > qml: currentIndex: 1
> > qml: trackQueue.count: 3
> > qml: Debug: MusicQueue update currentIndex:
> file:///home/victor/Music/2.ogg
> > qml: Source: file:///home/victor/Music/3.mp3
> > qml: Index: 2
> > GStreamer; Unable to pause - "file:///home/victor/Music/3.mp3"
> > GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
> > D-Bus error: "Could not get thumbnail"
> > Error: "Resource not found."
> > GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
> > GStreamer; Unable to play - "file:///home/victor/Music/3.mp3"
> > Error: "No URI set"
> > --
> >
> >
> https://code.launchpad.net/~vthompson/music-app/patch-mediascanner-db-ap-tests/+merge/232337
> > Your team Music App Developers is requested to review the proposed merge
> > of lp:~vthompson/music-app/patch-mediascanner-db-ap-tests into
> lp:music-app.
> >
>
> --
>
> https://code.launchpad.net/~vthompson/music-app/patch-mediascanner-db-ap-tests/+merge/232337
> You are the owner of
> lp:~vthompson/music-app/patch-mediascanner-db-ap-tests.
>

602. By Victor Thompson

Update user

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
603. By Victor Thompson

empty

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Thanks for the quick fix :) LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/music_app/content/mediascanner-2.0/mediastore.db'
2Binary files tests/autopilot/music_app/content/mediascanner-2.0/mediastore.db 2014-06-18 22:10:14 +0000 and tests/autopilot/music_app/content/mediascanner-2.0/mediastore.db 2014-08-27 12:21:22 +0000 differ
3=== modified file 'tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sql'
4--- tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sql 2014-06-18 22:10:14 +0000
5+++ tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sql 2014-08-27 12:21:22 +0000
6@@ -1,7 +1,7 @@
7 BEGIN TRANSACTION;
8 DROP TABLE media;
9 CREATE TABLE media (
10- filename TEXT PRIMARY KEY NOT NULL,
11+ filename TEXT PRIMARY KEY NOT NULL CHECK (filename LIKE '/%'),
12 content_type TEXT,
13 etag TEXT,
14 title TEXT,
15@@ -17,23 +17,25 @@
16 height INTEGER, -- Only relevant to video/images
17 latitude DOUBLE,
18 longitude DOUBLE,
19- type INTEGER -- 0=Audio, 1=Video
20+ type INTEGER CHECK (type IN (1, 2, 3)) -- MediaType enum
21 );
22-INSERT INTO "media" VALUES('/home/phablet/Music/1.ogg','audio/ogg','1401368666:257952','Gran Vals','1902','Francisco Tárrega','','Francisco Tárrega','',0,0,202,0,0,0.0,0.0,1);
23-INSERT INTO "media" VALUES('/home/phablet/Music/2.ogg','audio/ogg','1401457265:78191','Swansong','','Josh Woodward','','Josh Woodward','',0,0,62,0,0,0.0,0.0,1);
24-INSERT INTO "media" VALUES('/home/phablet/Music/3.mp3','audio/mpeg','1401457265:78191','TestMP3Title','','TestMP3Artist','TestMP3Album','TestMP3Artist','',0,0,6,0,0,0.0,0.0,1);
25-
26-CREATE INDEX media_album_album_artist_idx ON media(album, album_artist);
27+INSERT INTO `media` VALUES('/home/phablet/Music/3.mp3','audio/mpeg','1409095536:151042','TestMP3Title','','TestMP3Artist','TestMP3Album','TestMP3Artist','',0,0,6,0,0,'0.0','0.0',1);
28+INSERT INTO `media` VALUES('/home/phablet/Music/1.ogg','audio/ogg','1409095536:159042','Gran Vals',1902,'Francisco Tárrega','','Francisco Tárrega','',0,0,202,0,0,'0.0','0.0',1);
29+INSERT INTO `media` VALUES('/home/phablet/Music/2.ogg','audio/ogg','1409095536:183042','Swansong','','Josh Woodward','','Josh Woodward','',0,0,62,0,0,'0.0','0.0',1);
30+CREATE INDEX media_type_idx ON media(type);
31+CREATE INDEX media_song_info_idx ON media(type, album_artist, album, disc_number, track_number, title) WHERE type = 0;
32+CREATE INDEX media_genre_idx ON media(type, genre) WHERE type = 0;
33+CREATE INDEX media_artist_idx ON media(type, artist) WHERE type = 0;
34+CREATE TRIGGER media_bu BEFORE UPDATE ON media BEGIN
35+ DELETE FROM media_fts WHERE docid=old.rowid;
36+END;
37+CREATE TRIGGER media_bd BEFORE DELETE ON media BEGIN
38+ DELETE FROM media_fts WHERE docid=old.rowid;
39+END;
40+CREATE TRIGGER media_au AFTER UPDATE ON media BEGIN
41+ INSERT INTO media_fts(docid, title, artist, album) VALUES (new.rowid, new.title, new.artist, new.album);
42+END;
43 CREATE TRIGGER media_ai AFTER INSERT ON media BEGIN
44 INSERT INTO media_fts(docid, title, artist, album) VALUES (new.rowid, new.title, new.artist, new.album);
45 END;
46-CREATE TRIGGER media_au AFTER UPDATE ON media BEGIN
47- INSERT INTO media_fts(docid, title, artist, album) VALUES (new.rowid, new.title, new.artist, new.album);
48-END;
49-CREATE TRIGGER media_bd BEFORE DELETE ON media BEGIN
50- DELETE FROM media_fts WHERE docid=old.rowid;
51-END;
52-CREATE TRIGGER media_bu BEFORE UPDATE ON media BEGIN
53- DELETE FROM media_fts WHERE docid=old.rowid;
54-END;
55 COMMIT;

Subscribers

People subscribed via source and target branches

to status/vote changes: