-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Cast to int the execution time #1063
Conversation
->with($config->getTableName(), [ | ||
$config->getVersionColumnName() => '1230', | ||
$config->getExecutedAtColumnName() => $executedAt, | ||
$config->getExecutionTimeColumnName() => 31000, |
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.
@goetas I understand your approach. I though about the same, but, if you remove the (int)
cast, the test still passes. That is why I used mock
and assertSame
. Wdyt?
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.
If the issue only happens on Google Spanner, there is no way we are going to get a failing test, since we don't have Google Spanner tested in our CI, right?
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.
In my PR the test fails if we remove the casting, cause I am using assertSame
. Here the SQLite does internal cast, different from Spanner, so the test never fails and this was already covered on other tests.
I would prefer be sure this is an integer. My test makes sure about this. I only could check this using mocks or instead I would have to refactor other classes to avoid mock
, but I wanted to impact as low as possible :)
tests/Doctrine/Migrations/Tests/Metadata/Storage/TableMetadataStorageTest.php
Outdated
Show resolved
Hide resolved
34180e1
to
42578bf
Compare
… as Google Spanner)
42578bf
to
b06a386
Compare
I have changed the tests to use |
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.
Not sure you can point this to my branch, but I applied your changes in the test there if you do not mind. I agree the test is cleaner. Thanks
Done in #1060 |
Cast to int the execution time (to avoid incompatibilities with RDBMS as Google Spanner)