Details
Tests not fails when running yarn test-tunnelbroker-service
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
services/tunnelbroker/test/DatabaseManagerTest.cpp | ||
---|---|---|
318–339 ↗ | (On Diff #14285) | We should have a test that verifies that not all the messages are deleted - we should put a message with the same deviceID that isn't deleted and another message with a different deviceID |
services/tunnelbroker/test/DatabaseManagerTest.cpp | ||
---|---|---|
305–321 ↗ | (On Diff #14285) | Wouldn't it be better to first check if the table is available and only then create the items? |
309–316 ↗ | (On Diff #14285) | Shouldn't we add a constant with a value of 256? |
320 ↗ | (On Diff #14285) | Does this compile? Am I missing something or item is not defined in the scope here? |
Updates based on the comments.
services/tunnelbroker/test/DatabaseManagerTest.cpp | ||
---|---|---|
305–321 ↗ | (On Diff #14285) |
To invocate .getTableName() we need to create an database::MessageItem instance anyway. We can do this before but need to create an empty instance and we will have an additional instance of the database::MessageItem. So it doesn't worth it here. |
309–316 ↗ | (On Diff #14285) |
Yes, sure! Done. |
318–339 ↗ | (On Diff #14285) |
Good catch. I've changed the test to insert three messages for the same deviceID, but to delete 2 of 3 messages. Then we check that the one message still persisted and was not deleted after calling the batch removing. |
320 ↗ | (On Diff #14285) |
Fixed that nit. Re-checks it, now it compiles without errors. Thanks. |
services/tunnelbroker/test/DatabaseManagerTest.cpp | ||
---|---|---|
305–321 ↗ | (On Diff #14285) | right |