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

C_FindObjects: init list to reload new objects #789

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pepipox
Copy link

@pepipox pepipox commented Sep 20, 2022

If the db is modified externally while an application has the db store open, new objects are not seen by the application becuase it occurs after the application has loaded the list of tobjects. To correct this, reload the list on every C_FindObjectsInit call.

Signed-off-by: jupana, Juan Narino [email protected]
Signed-off-by: William Roberts [email protected]

@williamcroberts
Copy link
Member

@pepipox to get this over the line the issues in the unit tests are that I mock certain DB functions and when changing on how the DB functions are called internally messes up the expected mocking in the unit tests.

For instance, you'll see these errors:

2022-09-19T17:23:17.2159476Z [  ERROR   ] --- No entries for symbol __wrap_sqlite3_step.
2022-09-19T17:23:17.2159816Z ../test/unit/test_db.c:157: error: Could not get value to mock function __wrap_sqlite3_step
2022-09-19T17:23:17.2160201Z ../test/unit/test_db.c:1321: note: Previously returned mock value was declared here
2022-09-19T17:23:17.2160409Z 

Can you update the mocking in the unit tests? Then we can pull this change in and cut a release for distros to pick up.

@pepipox
Copy link
Author

pepipox commented Oct 26, 2022

Hi @williamcroberts
I will try to modify those mockups and let you know. Thanks for the pointers.

@williamcroberts
Copy link
Member

williamcroberts commented Oct 28, 2022 via email

If the db is modified externally while an application has the db store
open, new objects are not seen by the application becuase it occurs
after the application has loaded the list of tobjects. To correct this,
reload the list on every C_FindObjectsInit call.

Signed-off-by: jupana, Juan Narino <[email protected]>
Signed-off-by: William Roberts <[email protected]>
@williamcroberts
Copy link
Member

williamcroberts commented Sep 5, 2024

Just rebased your remote reloadObjectsOnCFindInit branch onto master, likely still have the mock test issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants