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

WIP: add new test to uncoverage SQLite3 method. #1803

Closed
wants to merge 4 commits into from

Conversation

marcosptf
Copy link
Contributor

new test to sqlite3 module.

@krakjoe
Copy link
Member

krakjoe commented Oct 17, 2016

I'm not sure how this test works.

@marcosptf
Copy link
Contributor Author

Hello @krakjoe how are you?
fine?

please, give me some example and ill fix this code!
thanks for your comment!

@marcosptf
Copy link
Contributor Author

hello @krakjoe how are you?

i'll try explain what i want to do:
1)these lines, a want the this function return a boolean becouse is a valid param:
var_dump($db->busyTimeout(0));
var_dump($db->busyTimeout(1000));

2)these lines, a want this function return anything, false, exception or some error, because the param is invalid, but the same time this function return a boolean true.
var_dump($db->busyTimeout(null));
var_dump($db->busyTimeout(-1000));

Do you know if is a correct ?

Thanks!!!

@KalleZ
Copy link
Member

KalleZ commented Oct 26, 2016

@krakjoe its simply for coverage, the return value will in 99% cases always be true, the only way we can trigger a warning is if libsqlite3 was compiled with their API Armor (which we do not do for the bundled libsqlite3), I did a commit related to this PR as I was reading through it but forgot to reply:
http://git.php.net/?p=php-src.git;a=commitdiff;h=6ca38e8cf8a4fa4b11a4a92131ef8f476659b7a9;hp=b4a6408029b6202af8bc4df2e0116f17b1067e88

@marcosptf The test seems good enough to me

@marcosptf
Copy link
Contributor Author

@krakjoe @KalleZ
okey thanks for explain to us!!!

@krakjoe
Copy link
Member

krakjoe commented Jan 6, 2017

@KalleZ sorry but adding tests that are going to intermittently fail (even in a tiny minority of cases) doesn't seem sensible to me, so I won't commit this.

Can't a skipif be added to detect the case where it may raise a warning and skip, if that makes sense ?

@marcosptf
Copy link
Contributor Author

Hello @krakjoe how are you?
fine?

this --skipif-- tag is used by:
https://github.com/php/php-src/blob/master/ext/sqlite3/tests/sqlite3_03_insert.phpt#L3
https://github.com/php/php-src/blob/master/ext/sqlite3/tests/sqlite3_02_create.phpt#L3
https://github.com/php/php-src/blob/master/ext/sqlite3/tests/sqlite3_01_open-mb.phpt#L3

and many others scripts.

please, give me some example and ill fix this code!
thanks for your comment!

have a nice day!

@krakjoe
Copy link
Member

krakjoe commented Apr 17, 2017

I believe we have new abilities in this area, XFAILIF, please research it and update test accordingly.

@marcosptf
Copy link
Contributor Author

thanks, fixing....

@marcosptf marcosptf changed the title add new test to uncoverage SQLite3 method. WIP: add new test to uncoverage SQLite3 method. May 7, 2017
@krakjoe
Copy link
Member

krakjoe commented Jul 25, 2017

Merged 6347e25

Thanks.

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

Successfully merging this pull request may close these issues.

4 participants