Skip to content

test: increase coreFraction in e2e tests#2217

Draft
universal-itengineer wants to merge 14 commits intomainfrom
test/fix/increase-corefraction
Draft

test: increase coreFraction in e2e tests#2217
universal-itengineer wants to merge 14 commits intomainfrom
test/fix/increase-corefraction

Conversation

@universal-itengineer
Copy link
Copy Markdown
Member

@universal-itengineer universal-itengineer commented Apr 14, 2026

Description

Increase CPU coreFraction allocation and fix resource cleanup in e2e tests to improve test stability.

Changes

  1. Increase coreFraction in e2e tests (test/e2e/blockdevice/data_exports.go, test/e2e/vm/configuration.go, test/e2e/vm/sizing_policy.go, test/e2e/vmop/restore.go):

    • Changed coreFraction from 5% to 50-100% for resource-intensive tests
  2. Increase coreFraction in legacy e2e tests (test/e2e/legacy/testdata/*):

    • Changed coreFraction from 5% to 50% (100% for vm-disk-attachment, 20% for vm-migration)
    • Affected 11 test data files
  3. Fix cleanup in ComplexTest (test/e2e/legacy/complex.go):

    • Moved resource deletion from Context/It block to AfterAll hook
    • Ensures test resources are cleaned up even if tests fail

Why do we need it, and what problem does it solve?

E2e tests with low coreFraction (5%) are flaky and fail intermittently due to insufficient CPU resources, especially in CI environments with resource contention. Additionally, the cleanup logic in ComplexTest was placed inside a test step, causing test resources to remain in the cluster if tests failed before reaching that step.

What is the expected result?

  • More stable e2e tests with consistent CPU allocation
  • Guaranteed cleanup of test resources after ComplexTest completion, regardless of test outcome

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: test
type: fix
summary: Increase coreFraction allocation in e2e tests for better stability.
impact_level: low
section: test
type: fix
summary: Fix ComplexTest resource cleanup by using AfterAll hook instead of Context/It block.
impact_level: low

@universal-itengineer universal-itengineer force-pushed the test/fix/increase-corefraction branch 2 times, most recently from 625cc9a to 49eefd1 Compare April 15, 2026 13:47
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
@universal-itengineer universal-itengineer force-pushed the test/fix/increase-corefraction branch from b0d1d89 to b93789f Compare April 15, 2026 17:09
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
@universal-itengineer universal-itengineer force-pushed the test/fix/increase-corefraction branch from e44cbfd to c82b40b Compare April 15, 2026 19:17
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
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