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

VPN-6706: fix timer after server unavailable #10238

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mcleinman
Copy link
Collaborator

Description

If a connection attempt results in a "server unavailable" modal, the user is encouraged to select a new server. However, that results in the timer being stuck at 0:00:00:

  1. Since the first server never fully connected, the timer is never started
  2. Since the second server is technically a server switch, the timer isn't touched when switching servers

Since this could be fragile, I added a test to make sure this doesn't break in the future. While writing that test:

  • forceServerUnavailable got some parameters added to it, as the CLI command requires parameters (previously, this testing command was unused)
  • I changed the stub server response to have different "public keys". We gray out unavailable servers based on their public key - so when we marked a server unavailable in our test, all servers were being marked unavailable because they shared a public key.
  • I created a new helper function to prevent code duplication.

Reference

VPN-6706

Checklist

  • My code follows the style guidelines for this project
  • I have not added any packages that contain high risk or unknown licenses (GPL, LGPL, MPL, etc. consult with DevOps if in question)
  • I have performed a self review of my own code
  • I have commented my code PARTICULARLY in hard to understand areas
  • I have added thorough tests where needed

@mcleinman mcleinman requested review from oskirby and strseb January 30, 2025 21:35
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.

1 participant