{"action":"created","issue":{"url":"https://api.github.com/repos/cloudant/sync-android/issues/135","labels_url":"https://api.github.com/repos/cloudant/sync-android/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/cloudant/sync-android/issues/135/comments","events_url":"https://api.github.com/repos/cloudant/sync-android/issues/135/events","html_url":"https://github.com/cloudant/sync-android/pull/135","id":78215606,"number":135,"title":"Fix FTS enabled check","user":{"login":"alfinkel","id":8793303,"avatar_url":"https://avatars.githubusercontent.com/u/8793303?v=3","gravatar_id":"","url":"https://api.github.com/users/alfinkel","html_url":"https://github.com/alfinkel","followers_url":"https://api.github.com/users/alfinkel/followers","following_url":"https://api.github.com/users/alfinkel/following{/other_user}","gists_url":"https://api.github.com/users/alfinkel/gists{/gist_id}","starred_url":"https://api.github.com/users/alfinkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfinkel/subscriptions","organizations_url":"https://api.github.com/users/alfinkel/orgs","repos_url":"https://api.github.com/users/alfinkel/repos","events_url":"https://api.github.com/users/alfinkel/events{/privacy}","received_events_url":"https://api.github.com/users/alfinkel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-19T19:15:21Z","updated_at":"2015-05-20T08:29:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cloudant/sync-android/pulls/135","html_url":"https://github.com/cloudant/sync-android/pull/135","diff_url":"https://github.com/cloudant/sync-android/pull/135.diff","patch_url":"https://github.com/cloudant/sync-android/pull/135.patch"},"body":"_What_\r\n\r\nText search tests fail during Android testing because of SQLite idiosyncrasies on Android.\r\n\r\n_Why_\r\n\r\nWe need to ensure that text search will work on Android mobile devices as well as we need to ensure that our build tests pass without failures.\r\n\r\n_How_\r\n\r\nSince the problem is that the `PRAGMA compile_options` command is returning an empty cursor when executed on Android, change the FTS availability check to instead create a SQL FTS virtual table.  Successful table creation means that FTS is available whereas a failed table create means that FTS is not enabled.\r\n\r\n_Tests_\r\n\r\n- IndexManagerTest: removed the check for `ENABLE_FTS3` and `ENABLE_FTS3_PARENTHESIS` compile options in `validateTextSearchIsAvailable()`, since this check will fail in Android.\r\n- Add conditional logic to two enhanced query syntax tests to check for `ENABLE_FTS3` and `ENABLE_FTS3_PARENTHESIS` and only execute the content of the tests if enhanced query syntax is available.  This conditional logic allows us to still run the enhanced query syntax tests during Java SE testing.\r\n\r\nreviewer @mikerhodes \r\nreviewer @rhyshort \r\n\r\nBugId: 46093"},"comment":{"url":"https://api.github.com/repos/cloudant/sync-android/issues/comments/103807503","html_url":"https://github.com/cloudant/sync-android/pull/135#issuecomment-103807503","issue_url":"https://api.github.com/repos/cloudant/sync-android/issues/135","id":103807503,"user":{"login":"rhyshort","id":1616727,"avatar_url":"https://avatars.githubusercontent.com/u/1616727?v=3","gravatar_id":"","url":"https://api.github.com/users/rhyshort","html_url":"https://github.com/rhyshort","followers_url":"https://api.github.com/users/rhyshort/followers","following_url":"https://api.github.com/users/rhyshort/following{/other_user}","gists_url":"https://api.github.com/users/rhyshort/gists{/gist_id}","starred_url":"https://api.github.com/users/rhyshort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhyshort/subscriptions","organizations_url":"https://api.github.com/users/rhyshort/orgs","repos_url":"https://api.github.com/users/rhyshort/repos","events_url":"https://api.github.com/users/rhyshort/events{/privacy}","received_events_url":"https://api.github.com/users/rhyshort/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T08:29:33Z","updated_at":"2015-05-20T08:29:33Z","body":"+1"}}