Problem/Motivation
Non-core database drivers may have specific strategies on automatic incrementing. For example, Oracle will allocate a last id with a failing insert that is discarded, and a good insert will get a new id instead.
That makes testChangePrimaryKeyToSerial fail because the check is on an exact value of the last id.
Proposed resolution
Use assertGreaterThanOrEqual in place of assertEquals.
Remaining tasks
Answer #4
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3355841-2.patch | 1.03 KB | mondrake |
Comments
Comment #2
mondrakePatch
Comment #3
smustgrave commentedSeems like a simple change.
Comment #4
catchIf this is in DriverSpecificSchemaTestBase can't contrib drivers override the method? Not sure about having core use the less-specific assertion for drivers that pass with the more specific one.
Comment #5
smustgrave commentedThat I can not answer so moving to PNMI per #3
Comment #6
mondrake#4 we may, but here I don't think it's relevant the actual value, so by loosening the test we can exatcly avoid contrib to have to override.
Rather, we could write a separate test (this one really driver specific) with different cases of inserting or not a value in a serial column, forcing a gap skip in the autonumbering etc - but that would be a separate issue.
Comment #7
smustgrave commentedThanks for answering @mondrake. Opened #3358646: Additional tests for DriverSpecificSchemaTestBase per your comment.
Comment #9
mondrakebot fluke
Comment #13
larowlanCommitted 7d9c51d and pushed to 11.x. Thanks!
Cherry picked to 10.1.x
I think addressing #4 in a followup feels like a reasonable compromise.