Skip to content

chore(test): fix parallel VM tests execution#2608

Merged
bpg-dev merged 2 commits intomainfrom
fix-parallel-test-execution
Feb 18, 2026
Merged

chore(test): fix parallel VM tests execution#2608
bpg-dev merged 2 commits intomainfrom
fix-parallel-test-execution

Conversation

@bpg-dev
Copy link
Copy Markdown
Member

@bpg-dev bpg-dev commented Feb 18, 2026

What does this PR do?

Contributor's Note

  • I have run make lint and fixed any issues.
  • I have updated documentation (FWK: schema descriptions + make docs; SDK: manual /docs/ edits).
  • I have added / updated acceptance tests (required for new resources and bug fixes — see ADR-006).
  • I have considered backward compatibility (no breaking schema changes without ! in PR title).
  • For new resources: I followed the reference examples.
  • I have run make example to verify the change works (mainly for SDK / provider config changes).

Proof of Work

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #0000 | Relates #0000

Signed-off-by: Pavel Boldyrev <pavel@bpg.sh>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @bpg-dev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the reliability and efficiency of VM-related acceptance tests by addressing issues that arise during parallel execution. It centralizes the management of cloud image downloads and ensures that test resources, such as image files and cloud-init snippets, are uniquely named. These changes prevent resource conflicts and ensure consistent test outcomes when tests are run concurrently.

Highlights

  • Centralized Cloud Image Downloads: Refactored the logic for downloading cloud images into a shared test environment helper, te.DownloadCloudImage(), to prevent conflicts and improve reusability across parallel tests.
  • Unique Test Resource Naming: Implemented unique naming for downloaded cloud images and cloud-init snippet files by incorporating test-specific variables (e.g., {{.TestName}}), resolving potential collisions during concurrent test execution.
  • Optimized Parallel Test Execution: Removed redundant t.Parallel() calls from individual sub-tests within TestAccResourceVMHotplug, as the main test function already handles parallel execution, streamlining test setup and preventing nested parallelization issues.
  • Enhanced VM Cleanup in Tests: Added stop_on_destroy = true to VM resources in several tests to ensure proper cleanup and prevent resource leakage, especially important in parallel test runs.
Changelog
  • fwprovider/test/resource_vm_disks_test.go
    • Refactored image download to use the shared DownloadCloudImage helper.
    • Updated test configurations to use unique file names for downloaded images.
  • fwprovider/test/resource_vm_hotplug_test.go
    • Removed the local downloadCloudImage function, now using the shared helper.
    • Removed t.Parallel() calls from sub-tests to avoid nested parallelization issues.
    • Added stop_on_destroy = true to VM resources in hotplug tests.
  • fwprovider/test/resource_vm_template_test.go
    • Refactored image download to use the shared DownloadCloudImage helper.
  • fwprovider/test/resource_vm_test.go
    • Integrated the shared DownloadCloudImage helper for VM initialization and network tests.
    • Ensured unique file names for cloud-init snippets and added overwrite = true for download file resources.
    • Added stop_on_destroy = true to VM resources in initialization and network tests.
  • fwprovider/test/test_environment.go
    • Introduced a new DownloadCloudImage method to the Environment struct for centralized cloud image management.
    • Added necessary imports (context, time, ptr) to support the new helper method.
Activity
  • No human activity (comments, reviews, progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Signed-off-by: Pavel Boldyrev <pavel@bpg.sh>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly improves the stability and reliability of the parallel acceptance tests. By centralizing the cloud image download, ensuring unique filenames for test artifacts, and correctly managing test concurrency, the changes effectively address potential race conditions and flakiness. The refactoring is clean and the addition of stop_on_destroy for running VMs is a good practice that further enhances test robustness. Overall, this is an excellent set of improvements to the test suite.

@bpg-dev bpg-dev merged commit 09500be into main Feb 18, 2026
6 checks passed
@bpg-dev bpg-dev deleted the fix-parallel-test-execution branch February 18, 2026 02:20
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