Skip to content

Conversation

shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Oct 13, 2025

Description

Fixes flakiness in unit test causing packaging failures.
Improves disconnect hook handling for KVM

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):

Failures see

14:31:39 [ERROR]   LazyCacheTest.testLoaderNotCalledIfPresent:63 
14:31:39 function.apply("key2");
14:31:39 Wanted 1 time:
14:31:39 -> at org.apache.cloudstack.utils.cache.LazyCacheTest.testLoaderNotCalledIfPresent(LazyCacheTest.java:63)
14:31:39 But was 2 times:
14:31:39 -> at com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$3(LocalLoadingCache.java:183)
14:31:39 -> at com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$3(LocalLoadingCache.java:183)

...

16:51:51 [ERROR] Failures: 
16:51:51 [ERROR]   LazyCacheTest.testMaximumSize:113 
16:51:51 function.apply("key7");
16:51:51 Wanted 2 times:
16:51:51 -> at org.apache.cloudstack.utils.cache.LazyCacheTest.testMaximumSize(LazyCacheTest.java:113)
16:51:51 But was 1 time:
16:51:51 -> at com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$3(LocalLoadingCache.java:183)
16:51:51 
16:51:51 [INFO] 
16:51:51 [ERROR] Tests run: 2696, Failures: 1, Errors: 0, Skipped: 1
10:20:17 [ERROR] Failures: 
10:20:17 [ERROR]   ConfigKeyScheduledExecutionWrapperTest.scheduleDynamicTest:110 Runnable ran four times per second
10:20:17 Expected: one of {<7>, <8>}
10:20:17      but: was <9>
10:20:17 [INFO] 
10:20:17 [ERROR] Tests run: 27, Failures: 1, Errors: 0, Skipped: 0

...

12:55:18 [ERROR] Failures: 
12:55:18 [ERROR]   ConfigKeyScheduledExecutionWrapperTest.scheduleDynamicTest:110 Runnable ran four times per second
12:55:18 Expected: one of {<7>, <8>}
12:55:18      but: was <6>
12:55:18 [INFO] 
12:55:18 [ERROR] Tests run: 27, Failures: 1, Errors: 0, Skipped: 0
17:07:14 [ERROR] Failures: 
17:07:14 [ERROR]   DisconnectHooksTest.addAndRunTwoHooksWithTimeout:166
17:07:14 [INFO] 
17:07:14 [ERROR] Tests run: 576, Failures: 1, Errors: 0, Skipped: 2

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

Copy link

codecov bot commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 39.13043% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.55%. Comparing base (b99a030) to head (a2ea1e1).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
...ervisor/kvm/resource/LibvirtComputingResource.java 39.13% 14 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11834      +/-   ##
============================================
- Coverage     17.56%   17.55%   -0.02%     
- Complexity    15500    15524      +24     
============================================
  Files          5899     5907       +8     
  Lines        527793   528671     +878     
  Branches      64479    64558      +79     
============================================
+ Hits          92714    92809      +95     
- Misses       424653   425429     +776     
- Partials      10426    10433       +7     
Flag Coverage Δ
uitests 3.58% <ø> (-0.01%) ⬇️
unittests 18.62% <39.13%> (-0.02%) ⬇️

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant