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

Add test for syncing complex forms twice #1256

Merged
merged 32 commits into from
Nov 28, 2024

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Nov 19, 2024

Integration test to verify whether #1251 has been fixed.

The second sync, that should do nothing, was importing the seed data,
including the parts of speech and semantic domains that weren't in
fwdata after the first sync.
@rmunn rmunn self-assigned this Nov 19, 2024
This was not successful at reproducing the issue we encounter syncing
sena-3, because this test is passing. I'll keep working at it.
@myieye
Copy link
Contributor

myieye commented Nov 19, 2024

I just synced elawa multiple times and each time the number of fwdata changes decreased, but it took about 5 syncs before it was 0.
So, I think it's probably a good idea to have an integration test that uses a project with all out model features to ensure that a second sync always results in 0 changes.

@rmunn
Copy link
Contributor Author

rmunn commented Nov 22, 2024

Since the CreatingAComplexEntryInFwDataSyncsWithoutIssue test doesn't actually test the bug from #1251, we might want to delete it. But this is ready for review regardless, whether or not we decide to delete CreatingAComplexEntryInFwDataSyncsWithoutIssue.

@rmunn rmunn marked this pull request as ready for review November 22, 2024 09:45
@rmunn rmunn requested a review from hahn-kev November 22, 2024 09:46
…hich only show up when running all tests at once
… headwords get set so that they match what we get from fieldworks
…t to avoid issues where the complex form does not get created because it's referencing an entry which does not exist
Copy link
Collaborator

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmunn I've got this working now. I'd like to see the Sena3 fixture cleanup after itself so we don't just create a bunch of copies of projects every time the tests are run. I'd do the cleanup before the test run so in a failure you can investigate the results.

edit: also I just merged #1264 into this PR since they were closely related, I'll just close it once this PR is merged in.

@rmunn
Copy link
Contributor Author

rmunn commented Nov 27, 2024

To delete a CRDT project, is it enough to delete the projectname.sqlite file? Or is there an API I need to call to unregister the project as well?

Copy link
Contributor

@myieye myieye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just got a couple suggestions.
But, there are tests failing, so I feel like I'm not late 🙃

@hahn-kev hahn-kev merged commit 18530d4 into develop Nov 28, 2024
11 checks passed
@hahn-kev hahn-kev deleted the bug/sync-crdt-twice-should-not-throw branch November 28, 2024 06:40
@rmunn rmunn linked an issue Nov 29, 2024 that may be closed by this pull request
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.

Trying to sync sena 3 twice via fw headless results in an error
3 participants