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

Fix failing unit tests on OracleDB #2263

Merged

Conversation

DeepDiver1975
Copy link
Contributor

fixes #2250

getDropAutoincrementSql cannot take a Table object - only string is allowed

@Ocramius here we go - alternative approach for #2251

@DeepDiver1975 DeepDiver1975 changed the title fixes #2250 Fix failin unit test on oracle Dec 16, 2015
@DeepDiver1975 DeepDiver1975 changed the title Fix failin unit test on oracle Fix failing unit test on oracle - second try Dec 16, 2015
@Ocramius
Copy link
Member

@DeepDiver1975 by callers I mean those who call this method: a string should be given.

@DeepDiver1975
Copy link
Contributor Author

@DeepDiver1975 by callers I mean those who call this method: a string should be given.

As in kill this unit test? 😉

https://github.com/doctrine/dbal/blob/master/tests/Doctrine/Tests/DBAL/Functional/WriteTest.php#L260-L265

@deeky666
Copy link
Member

Yeah the thing is, our API between schema manager and platform is not strict enough. Schema manager only allows string while platform allows string|Table. If we would be strict, the WriteTest had to be fixed. Though, I don't know how people are using the schema manager, whether they are "used" to passing objects and Doctrine not complaining...
IMO to be consistent with other getDrop*() methods, OraclePlatform::getDropAutoincrementSql() should also allow Table instances, but I am not sure whether we should widen the signature there.
Otherwise I would rather fix the test that misuses SchemaManager::dropTable() by passing a table object there.
@Ocramius thoughts?

@Ocramius
Copy link
Member

I don't know how people are using the schema manager, whether they are "used" to passing objects and Doctrine not complaining...

@deeky666 if we state string there (and there seems to be no mistake about it there), then consumers passing in a Table shouldn't be allowed to do so.

@DeepDiver1975
Copy link
Contributor Author

@Ocramius @deeky666 where are we going from here? I'd like to get this fixed.

Just let me know in which direction we want to go - I'm happy to take care about further development.

@DeepDiver1975
Copy link
Contributor Author

@Ocramius @deeky666 where are we going from here? I'd like to get this fixed.

Just let me know in which direction we want to go - I'm happy to take care about further development.

ping

@deeky666
Copy link
Member

deeky666 commented Jan 5, 2016

@DeepDiver1975 as confirmed by @Ocramius table objects are not allowed to be passed to dropTable. Therefore we should rather fix the WriteTest::testEmptyIdentityInsert() test case IMO.

@DeepDiver1975
Copy link
Contributor Author

Therefore we should rather fix the WriteTest::testEmptyIdentityInsert() test case IMO.

Okay - please expect a PR by the end of the week.

@deeky666
Copy link
Member

deeky666 commented Jan 5, 2016

@DeepDiver1975 thanks, just poke me again then. Btw you can also commit to this PR and then squash commits. No need to open a third PR.

@deeky666 deeky666 added this to the 2.6 milestone Jan 6, 2016
@deeky666 deeky666 self-assigned this Jan 6, 2016
@DeepDiver1975 DeepDiver1975 force-pushed the fix-failing-unit-test-on-oracle-2 branch from 7963fe2 to 0ee6645 Compare January 7, 2016 10:30
@DeepDiver1975
Copy link
Contributor Author

@DeepDiver1975 thanks, just poke me again then. Btw you can also commit to this PR and then squash commits. No need to open a third PR.

@deeky666 done - at least this one test now passes ...

@deeky666 deeky666 removed the WIP label Jan 7, 2016
deeky666 added a commit that referenced this pull request Jan 7, 2016
…oracle-2

Fix failing unit test on oracle - second try
@deeky666 deeky666 merged commit d3659e1 into doctrine:master Jan 7, 2016
@deeky666
Copy link
Member

deeky666 commented Jan 7, 2016

@DeepDiver1975 awesome thanks!

@DeepDiver1975 DeepDiver1975 deleted the fix-failing-unit-test-on-oracle-2 branch January 7, 2016 11:58
@deeky666 deeky666 removed the Bug label Jan 10, 2016
@Ocramius Ocramius changed the title Fix failing unit test on oracle - second try Fix failing unit tests on OracleDB Jul 22, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit tests are failing on OracleDB
3 participants