You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed in your code you do some hacky stuff by using Geary.getNextId to figure out if an entity has been removed. This is downright barbaric. It only makes sense if we assume that the engine always uses the lowest free slot for the next entity. You are relying on a hidden implementation detail in tests.
Additionally the use of Engine vs the constructed engine is really confusing and smelly.
The text was updated successfully, but these errors were encountered:
Geary Engine should provide a method to check if a GearyEntityId is tracked by the engine. There are a number of tests that test for Entity removal that end up being very hacky because of lack of support for this feature. You instead grab the next available entity id and check to see if it is the slot that was associated with the deleted entity.
The use of Engine rather than directly using implementation under test in geary tests is problematic. If we are testing the geary engine, we should not be creating it then relying on the service getter to fetch the engine during the test. We have a direct reference to the engine already. See QueryManagerTest for an example.
I noticed in your code you do some hacky stuff by using Geary.getNextId to figure out if an entity has been removed. This is downright barbaric. It only makes sense if we assume that the engine always uses the lowest free slot for the next entity. You are relying on a hidden implementation detail in tests.
Additionally the use of Engine vs the constructed engine is really confusing and smelly.
The text was updated successfully, but these errors were encountered: