Skip to content

api: remove powermock from tests - #7645

Merged
yadvr merged 2 commits into
apache:mainfrom
shapeblue:api-remove-powermock
Sep 25, 2023
Merged

yadvr merged 2 commits into
apache:mainfrom
shapeblue:api-remove-powermock

Conversation

@vishesh92

Copy link
Copy Markdown
Member

Description

This PR removes usage of powermock from api's tests.

After this change, this is the remaining usage of powermock left.

$ git grep "PowerMockito" | tr "/" " "| awk '{print $1, $2, $3, $4}' | sort | uniq -c 
     60 agent src test java
     51 core src test java
     37 engine schema src test
     68 engine storage configdrive src
      9 engine storage snapshot src
     11 plugins acl project-role-based src
      3 plugins database quota src
    150 plugins hypervisors kvm src
      3 plugins hypervisors vmware src
     40 plugins hypervisors xenserver src
      5 plugins integrations kubernetes-service src
      2 plugins network-elements nicira-nvp src
     96 plugins network-elements tungsten src
      1 plugins storage volume storpool
     17 plugins user-authenticators ldap src
    196 server src test java
      4 services console-proxy server src
      2 services secondary-storage server src
      2 vmware-base src test java

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)

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?

@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 6260

@vishesh92

Copy link
Copy Markdown
Member Author

Tests for cloud-server are failing now. I think adding api/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker changed the mock maker for cloud-server as well since cloud-server has cloud-api as it's dependency. We will need to remove powermock in a specific order.

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@yadvr

yadvr commented Jun 27, 2023

Copy link
Copy Markdown
Member

@vishesh92 can you merge latest main and fix conflicts

@DaanHoogland

Copy link
Copy Markdown
Contributor

@vishesh92 , should this still be in draft?

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@vishesh92

Copy link
Copy Markdown
Member Author

@vishesh92 , should this still be in draft?

@DaanHoogland yes. We need to remove power mock from maven modules in a particular order. We will be removing it from api module after we have removed from other modules which are dependent on cloud-api module.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 6390

@DaanHoogland

Copy link
Copy Markdown
Contributor

@vishesh92 is this still relevant?

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@vishesh92

Copy link
Copy Markdown
Member Author

Yeah. I will need to update and rebase with main branch and fix issues again.

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 6754

@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 6755

@codecov

codecov Bot commented Sep 20, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7645 (b3a7194) into main (c69e3c5) will decrease coverage by 0.08%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #7645      +/-   ##
============================================
- Coverage     29.23%   29.16%   -0.08%     
+ Complexity    30463    30362     -101     
============================================
  Files          5100     5100              
  Lines        358322   358322              
  Branches      52308    52308              
============================================
- Hits         104749   104488     -261     
- Misses       239182   239456     +274     
+ Partials      14391    14378      -13     
Flag Coverage Δ
simulator-marvin-tests 25.08% <ø> (-0.11%) ⬇️
uitests 4.87% <ø> (ø)
unit-tests 14.50% <ø> (ø)

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

see 59 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vishesh92
vishesh92 marked this pull request as ready for review September 22, 2023 12:09
@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@Pearl1594 Pearl1594 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - left a query, for the purpose of understanding .. thanks!

@blueorangutan

Copy link
Copy Markdown

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

@yadvr
yadvr merged commit 9c65767 into apache:main Sep 25, 2023
@yadvr
yadvr deleted the api-remove-powermock branch September 25, 2023 07:45
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.

5 participants