Skip to content

Fix xcpng test failures#12812

Open
vishesh92 wants to merge 1 commit intoapache:4.20from
shapeblue:fix-xcpng-tests
Open

Fix xcpng test failures#12812
vishesh92 wants to merge 1 commit intoapache:4.20from
shapeblue:fix-xcpng-tests

Conversation

@vishesh92
Copy link
Member

Description

This PR fixes xcpng test failures

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@boring-cyborg boring-cyborg bot added component:integration-test Python Warning... Python code Ahead! labels Mar 13, 2026
@sureshanaparti sureshanaparti requested a review from Copilot March 13, 2026 09:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses failing xcpng integration tests by ensuring environment clean-up (zone/pod/cluster re-enable) happens even when intermediate test steps throw exceptions.

Changes:

  • Wrap destructive test steps in try/finally to guarantee zones are re-enabled after System VM/IP range operations.
  • Wrap redundant-router deployment planning scenarios in try/finally to re-enable pods/clusters even on test failures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
test/integration/smoke/test_public_ip_range.py Ensures the zone allocation state is always restored to Enabled after destructive steps.
test/integration/component/maint/test_redundant_router_deployment_planning.py Ensures pods/clusters are re-enabled even when network/VM/router assertions fail mid-test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +775 to +778
cmd = updateCluster.updateClusterCmd()
cmd.id = cluster.id
cmd.allocationstate = 'Enabled'
self.apiclient.updateCluster(cmd)
self.assertNotEqual(
routers[0].hostid,
routers[1].hostid,
"Both the routers should be in different storage pools"
Comment on lines +301 to +304
cmd = updateZone.updateZoneCmd()
cmd.id = self.zone.id
cmd.allocationstate = 'Enabled'
self.apiclient.updateZone(cmd)
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.25%. Comparing base (56dc119) to head (20fb1f6).

Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #12812   +/-   ##
=========================================
  Coverage     16.25%   16.25%           
+ Complexity    13425    13423    -2     
=========================================
  Files          5662     5662           
  Lines        500167   500167           
  Branches      60740    60740           
=========================================
  Hits          81318    81318           
  Misses       409763   409763           
  Partials       9086     9086           
Flag Coverage Δ
uitests 4.15% <ø> (ø)
unittests 17.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17132

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:integration-test Python Warning... Python code Ahead!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants