Fix E2E tests #114

Merged
schmelczer merged 1 commit from asch/fix-e2e into main 2025-08-30 10:19:31 +01:00
schmelczer commented 2025-08-30 09:39:32 +01:00 (Migrated from github.com)

Fix regression around running offline sync too often

Fix regression around running offline sync too often
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-08-30 09:56:10 +01:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR fixes a regression in E2E tests by preventing the offline sync operation from being executed multiple times when it should only run once.

  • Adds a guard to ensure offline sync only runs on the first call to start()
  • Introduces a new boolean flag to track whether offline sync has been initiated

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

## Pull Request Overview This PR fixes a regression in E2E tests by preventing the offline sync operation from being executed multiple times when it should only run once. - Adds a guard to ensure offline sync only runs on the first call to `start()` - Introduces a new boolean flag to track whether offline sync has been initiated --- <sub>**Tip:** Customize your code reviews with copilot-instructions.md. <a href="/schmelczer/vault-link/new/main/.github?filename=copilot-instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Create the file</a> or <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">learn how to get started</a>.</sub>
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-08-30 09:56:10 +01:00

The hasFinishedOfflineSync flag is set to true immediately after starting the offline sync, but this should only be set after the sync actually completes. This creates a race condition where the flag indicates completion before the async operation finishes.

			this.hasFinishedOfflineSync = true;
		}
The `hasFinishedOfflineSync` flag is set to true immediately after starting the offline sync, but this should only be set after the sync actually completes. This creates a race condition where the flag indicates completion before the async operation finishes. ```suggestion this.hasFinishedOfflineSync = true; } ```
Sign in to join this conversation.
No description provided.