-
Notifications
You must be signed in to change notification settings - Fork 669
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
Upgraded simpletest to v. 1.1.0 #5456
Conversation
Ok, I've fixed problem with test for web_services, but remaining ones seem to show non deterministic order of attributes keys. |
see #4106 and comments |
Thanks. It seems that simpletest started to do deep check of the objects. I see two ways here:
I like the latter, as It's more natural to work with, but may be hard to achieve when having additional internals that ie. are computed laizily |
Ok, I've apparently fixed problem by not allowing to arbitrarly override attributes. My previous tests were on 1.8.x install, on my current 1.9 i have these fails remaining:
|
I wonder if we shouldn't force empty subtypes to particular value. Right now we initialize it in the code as null, but fetch empty string from database. We probably could change it to null if it's not valid number. |
Agreed. Ideally saving/reloading an entity should result in identical attribute values (except for those created during save of course). |
I went through problems with types for subtypes, container_guid, owner_guid and access_id (see commit above). Current problems are:
That's what I was affraid of. Having different value as tables_loaded sounds legitimate to me and I wouldn't like to tamper it for the sake of the tests. It seems that custom method for entity comparison is necessary after all. I didn't dig into details of last_action time, but it may be also legitimate behaviour. Another argument for custom compare. |
We should change timestamps (last_action etc.) type to int as well. I've tested difference in memory usage and it gives me ~20% more memory consumed for data stored in string instead of int. |
See also #4136 |
none that I can think of |
Ok, it now passes all tests on my side. I don't feel very well with last commit (i switch empty strings in name, description etc. to null in attribute value), as it's not elegant, but it's much simpler to have it this way than to change DB scheme and remove NOT NULL. Thoughts? |
Just rebased whole branch on most recent master. |
Commented out usages of $this->swallowErrors(); as it's not defined in simpletest anymore.
Ensured that owner_guid, container_guid and access_id are kept as integer, not a string.
…son. Stores numeric entity attributes as integers.
…d return values of type integer
I rebased and then merged this in. |
Main motivation was that old version failed a lot on strict error level (static calls in object context etc.).
Commented out usages of $this->swallowErrors(); as it's not defined in simpletest anymore.
I get now some errors when running tests: