Skip to content

[WIP] Add PDO Basic connection tests #12443

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SakiTakamachi
Copy link
Member

@SakiTakamachi SakiTakamachi commented Oct 15, 2023

This is WIP
Before proceeding with this, what is done in config.inc and common.phpt for each PDO driver is too different, so it might be better to make it common.....

Overview

There are a bit problem with the current database-related tests. Since a failure to connect to the database is a condition for skipping the test, CI cannot detect when the connection process itself is broken. Strictly speaking, you can find "strange" skips by looking at test artifacts, but it's very unlikely that a developer will look at it every time.

So I propose to add a very simple connection test. Those tests rely on whether fsockopen succeeds to decide whether to skip. If successful, it assumes that the database can be connected and attempts to test the connection.

These tests allow us to detect when a connection process is broken by CI failure.

What I'm worried about

I don't have any good ideas yet about what to do with SQLite.

About drivers other than PDO

I think it's difficult to check if I make a lot of changes all at once, so I'm starting with PDO first.

Current status

Since there are too many differences in config.inc etc. for each driver, I decided to organize that first.
This PR will remain in draft form for a while.

Tasks

  • pdo_dblib
  • pdo_firebird
  • pdo_mysql
  • pdo_oci
  • pdo_odbc
  • pdo_pgsql
  • pdo_sqlite

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.

1 participant