Skip to content

chore: fix remote server test for duplicate server add issue#1201

Merged
gmaclennan merged 3 commits intomainfrom
fix/duplicate-doc-roots-test
Dec 9, 2025
Merged

chore: fix remote server test for duplicate server add issue#1201
gmaclennan merged 3 commits intomainfrom
fix/duplicate-doc-roots-test

Conversation

@gmaclennan
Copy link
Member

@gmaclennan gmaclennan commented Dec 8, 2025

For #1200 I skipped running the new failing test on a remote server because the test setup was failing. The underlying issue is that there is a different race condition bug in the server when two clients try to add the same project to the server at the same time, which is low-priority to fix and I'm tracking in this issue: digidem/comapeo-cloud#66

This PR updates the test to add the duplicate server to the project sequentially. The underlying issue was not adding a duplicate server at exactly the same time, but two devices adding the same server while not connected / syncing with each other, so this updated test should catch the issue.

Although this PR only updates the test, I have reverted the fix, then added the test as a separate commit, to verify that the test actually fails prior to the fix still.

I recommend reviewing with the "Hide whitespace" option in Github, to help focus on the lines that have changed.

@gmaclennan gmaclennan self-assigned this Dec 8, 2025
Base automatically changed from fix/duplicate-doc-roots to main December 8, 2025 13:54
@gmaclennan gmaclennan force-pushed the fix/duplicate-doc-roots-test branch from 553882b to d5552a6 Compare December 8, 2025 22:34
@gmaclennan gmaclennan changed the title chore: debug test failures on remote chore: fix remote server test for duplicate server add issue Dec 8, 2025
@gmaclennan gmaclennan marked this pull request as ready for review December 8, 2025 22:53
@gmaclennan gmaclennan requested review from RangerMauve and achou11 and removed request for achou11 December 8, 2025 22:55
Copy link
Contributor

@RangerMauve RangerMauve left a comment

Choose a reason for hiding this comment

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

LGTM.

Do you know why this change works where the parallel case failed? If that's an issue we'll likely encounter it eventually. (race condition in calling get project while another get project is in progress?)

@gmaclennan
Copy link
Member Author

gmaclennan commented Dec 9, 2025

The issue causing the original parallel test failure is digidem/comapeo-cloud#66

@gmaclennan gmaclennan merged commit 2601fe2 into main Dec 9, 2025
11 checks passed
@gmaclennan gmaclennan deleted the fix/duplicate-doc-roots-test branch December 9, 2025 18:38
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