Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproduction & simple solution for #111 for review #117

Merged
merged 2 commits into from
Aug 12, 2014
Merged

Reproduction & simple solution for #111 for review #117

merged 2 commits into from
Aug 12, 2014

Conversation

brody4hire
Copy link

I have another way to reproduce bug #111 that does not require increasing the test timeout and will not affect any other tests. My observation is that the second, unwanted callback from db.executeSql() will not receive a valid res argument. If the callback function receives a second callback, with no valid res argument, it will show a test failure and let the test carry on.

In fact, for a single database statement executed by db.executeSql(), there is no extra BEGIN or COMMIT/ROLLBACK so my idea is to just keep it simple.

@nolanlawson
Copy link
Contributor

Elegant solution. Looks correct to me, and the tests pass on Android 4.4 and Android 2.3.

@brody4hire brody4hire merged commit f7329d3 into storesafe:common-src Aug 12, 2014
@brody4hire
Copy link
Author

Elegant solution. Looks correct to me, and the tests pass on Android 4.4
and Android 2.3.

Thanks Nolan for your help on this.

@Typhlosaurus
Copy link

Generally happy with your solution. The case where a statement completes
successfully but the transaction fails should be rare, and is likely to
occur when a lost transaction is the least of one's worries.

N.B. I didn't add the test timeout for this test; it was for the tests for
the uncalled callabacks (openDatabase and database.close). Without the
timeout, while the tests fail are failing, the suite never completes.

On 12 August 2014 07:00, Chris Brody [email protected] wrote:

Elegant solution. Looks correct to me, and the tests pass on Android 4.4
and Android 2.3.

Thanks Nolan for your help on this.


Reply to this email directly or view it on GitHub
#117 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants