HomePhabricator
Diffusion Comm f6ff2dbc33a1

[native] add function to initialize `DatabaseQueryExecutor`

Description

[native] add function to initialize DatabaseQueryExecutor

Summary:
Implementing approach described in ENG-1974.
This function will be called separately in iOS and Android so this time separating function from it's call to make it easier for reviewers.

Test Plan:

  1. Make it possible to throw and exception on migrate() function on demand.
  2. Call this function.
  3. Build the app for both platforms
  4. Check if:
  5. getQueryExecutor() works properly -> db status = WORKABLE
  6. getQueryExecutor() throws exception and there is nothing in store -> db status = 'FIRST_FAILURE' and app is terminated
  7. getQueryExecutor() throws exception and there WORKABLE -> db status = 'FIRST_FAILURE' and app is terminated
  8. getQueryExecutor() throws exception and there FIRST_FAILURE -> db status = 'SECOND_FAILURE' and app proceed
  9. getQueryExecutor() throws exception and there SECOND_FAILURE -> db status = 'SECOND_FAILURE' and app proceed

Reviewers: marcin, tomek

Reviewed By: marcin, tomek

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D5991

Details

Provenance
kamilAuthored on Dec 21 2022, 2:58 AM
Reviewer
marcin
Differential Revision
D5991: [native] add function to initialize `DatabaseQueryExecutor`
Parents
rCOMMeee4ca130b65: [services] Tunnelbroker - Add skip authentication config parameter
Branches
Unknown
Tags
Unknown