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

Protect against dropped databases #449

Merged
merged 4 commits into from
Jun 5, 2024
Merged

Protect against dropped databases #449

merged 4 commits into from
Jun 5, 2024

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Jun 4, 2024

See #448

Helps fix the worst of #448
@kegsay kegsay requested a review from devonh June 4, 2024 14:27
Copy link

@devonh devonh left a comment

Choose a reason for hiding this comment

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

Changes look good. The comment is much appreciated, especially for future people trying to understand this code.

Would it be simple enough to add a test for this? I imagine something around here would be easiest:

func TestExtensionToDevice(t *testing.T) {
All that should be necessary is to start up a fresh test, add some to-device messages, and do a sync with a position > 0. Then check you received all the messages. That should mimic the DB dropping sequence, without having to go through actually doing that in a test.

@kegsay kegsay requested a review from devonh June 4, 2024 16:00
@devonh
Copy link

devonh commented Jun 4, 2024

New test looks good! (other than the token comparison)

@kegsay kegsay merged commit 58a4c6f into main Jun 5, 2024
7 checks passed
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