minor: use pre-stopped mock instance in e2e tests#3208
Merged
Conversation
Several e2e tests stopped db1 purely to bypass a 'must be stopped' precondition (NIC create, disk attach/detach, boot-disk change, transit IPs edit). Adds db-stopped (with its own boot/data disks and NIC) and points 11 such tests at it. Tests that verify the disabled-while-running state (instance-disks 'Disabled actions', instance-networking 'NIC table', anti-affinity 'add and remove instance from group') keep using db1 + stopInstance. Wall time on the 11 affected tests dropped ~50% (34s → 17s); sum of per-test durations dropped ~55% (~117s → ~52s). Fix tests broken by adding db-stopped mock instance - disks.e2e.ts: bump expected disk row count from 14 to 16 (+2 stopped disks) - firewall-rules.e2e.ts: add db-stopped to instance combobox option lists - instance.e2e.ts: scope 'stopped' text locator to db1's row, since db-stopped's row also shows state 'stopped'
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
Saves about 20 seconds overall. I’ll take it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bunch of tests (11 tests) have to wait for an instance to stop in order to do things you need to stop the instance to do. If the instance is already stopped it saves like 5 seconds per test. The savings will probably be diluted by 5x parallelism, so it may only save 10 seconds on the full run, but it's probably still worth it.