Skip to content

Add more test coverage for ext/ODBC - #11938

Merged
kocsismate merged 4 commits into
php:masterfrom
kocsismate:odbc-tests
Aug 23, 2023
Merged

kocsismate merged 4 commits into
php:masterfrom
kocsismate:odbc-tests

Conversation

@kocsismate

Copy link
Copy Markdown
Member
  • adds tests for many functions which used to be untested
  • enable tests on Linux with unixODBC
  • fix (mostly xfail or skip) failing tests

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Main comments are about reducing the number of insertions queries and being confused at the inconsistent handling of the row parameter.

I also wonder if it makes sense to (in a follow-up) PR to enhance the warnings about invalid row numbers (if too larg) to use the appropriate function to check if the row number queried is actually in range? This could allow us to convert that case to a ValueError in the future.

Comment thread ext/odbc/tests/bug44618.phpt Resolved
Comment thread ext/odbc/tests/bug60616.phpt Resolved
Comment thread ext/odbc/tests/odbc_commit_001.phpt Resolved
Comment thread ext/odbc/tests/odbc_exec_001.phpt Resolved
Comment thread ext/odbc/tests/odbc_field_name_001.phpt Resolved
Comment thread ext/odbc/tests/odbc_field_num_001.phpt Resolved
Comment thread ext/odbc/tests/odbc_num_fields_001.phpt Resolved
@iluuu1994
iluuu1994 removed their request for review August 12, 2023 14:25
@kocsismate

Copy link
Copy Markdown
Member Author

Additionally, I managed to get rid of the CONFLICTS file (adding the --conflicts-- section was still necessary for 2 files).

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is fine if CI is happy

Comment thread ext/odbc/tests/bug47803.phpt Resolved
Comment thread ext/odbc/tests/odbc_fetch_into_001.phpt Outdated
Comment on lines 28 to 24

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah so that's what the 0 does

Comment thread ext/odbc/tests/odbc_field_len_001.phpt Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One should know the database schema one is dealing with tho?

Also odbc_num_fields() exists, but that's an aside.

@kocsismate
kocsismate force-pushed the odbc-tests branch 3 times, most recently from ef03a2d to 58e86d1 Compare August 23, 2023 08:53

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit but LGTM now

Comment thread ext/odbc/tests/bug69354.phpt Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: EOL before EOF

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

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.

2 participants