Skip to content

Log in again when the shared test session has expired - #1548

Merged
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vws-web-tools-issue-1506
Aug 27, 2026
Merged

Log in again when the shared test session has expired#1548
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vws-web-tools-issue-1506

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

Closes #1506.

logged_in_chrome_driver is module-scoped: it logs in once and every test in test_create_database.py shares that session. Nothing checks the session is still good. The module drives real Vuforia through a browser and takes tens of minutes on CI, so once it outlasts the session, every remaining test is driving a logged-out browser — and the symptom is a TimeoutException waiting for an element that was never going to appear, in whichever test happened to be running.

A new autouse fixture loads a page that needs a session before each test and logs in again if the portal redirects to the login page. The check is one page load, so a healthy session costs a navigation per test rather than a login per test.

The re-login is marked # pragma: no cover: it only runs when a session actually expires mid-module, which a healthy run never does, and --cov-fail-under 100 covers tests/ too.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM

Closes #1506

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM
@adamtheturtle
adamtheturtle force-pushed the adamtheturtle/vws-web-tools-issue-1506 branch from 122381f to 05b9568 Compare August 27, 2026 08:05
@adamtheturtle
adamtheturtle merged commit c7bc7db into main Aug 27, 2026
29 checks passed
@adamtheturtle
adamtheturtle deleted the adamtheturtle/vws-web-tools-issue-1506 branch August 27, 2026 10:39
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.

logged_in_chrome_driver module fixture never refreshes login on session expiry

1 participant