-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Tests] Optimized pdo_odbc tests #12654
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
base: master
Are you sure you want to change the base?
Conversation
a831cd0
to
969b544
Compare
try { | ||
$db = self::factory(); | ||
} catch (PDOException $e) { | ||
die('skip could not connect'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to eventually make parent skip like this, but the scope is too wide, so I won't change it yet in this PR.
2fed51c
to
74bbe7a
Compare
74bbe7a
to
341ce59
Compare
341ce59
to
ebb940a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This refactor LGTM. I have an obvious nitpick, but the rest is fine, I trust your judgement here.
The Access bit is clever; I remember there were some other funny ODBC drivers that came out of the box on Windows (like a CSV one), but Access is the one that’s probably actually reliable.
} | ||
} | ||
|
||
static function skipToofewCredentials() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: should be skipTooFewCredentials
$db->exec("DROP TABLE IF EXISTS bug80783a"); | ||
require_once __DIR__ . '/inc/odbc_pdo_test.inc'; | ||
$db = ODBCPDOTest::factory(); | ||
$db->exec("DROP TABLE IF EXISTS bug80783a_pdo_odbc"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment on the pattern: I like removing the hardcoded table names from the query strings. It’s a little annoying that it has to be hardcoded here after it was unhardcoded for all the tests in their FILE
sections, but I see why you probably didn’t do it for CLEAN
(it’d be an ugly use of ENV
/ARGS
, and I’m not sure if those get propagated to CLEAN
to begin with).
Related to the following PR.
#12555
I made the config a little easier to understand and changed the table name so that it can be executed in parallel with pdo core and ext/odbc tests.
(I don't think it's very likely that table names will overlap with pdo core or ext/odbc, but I thought about the possibility of that happening in the future.)