Skip to content

Add powermock global configuration#3467

Merged
hezhangjian merged 2 commits intoapache:masterfrom
yaalsn:fix-powermock-loadclass-error
Sep 5, 2022
Merged

Add powermock global configuration#3467
hezhangjian merged 2 commits intoapache:masterfrom
yaalsn:fix-powermock-loadclass-error

Conversation

@yaalsn
Copy link
Contributor

@yaalsn yaalsn commented Sep 4, 2022

Motivation

Fix #3115

When I try to run some test classes, there will occur an error message like the above issue cause javax/management/MBeanServer is a system class and javassist's classloader cannot load it. we can add powermock global configuration to ignore this error message.

The powermock's instruction is here: https://github.com/powermock/powermock/wiki/PowerMock-Configuration

Changes

Add org/powermock/extensions/configuration.properties.

@yaalsn
Copy link
Contributor Author

yaalsn commented Sep 4, 2022

@hangc0276 @eolivelli PTAL

@yaalsn yaalsn requested a review from nicoloboschi September 4, 2022 12:52
@yaalsn
Copy link
Contributor Author

yaalsn commented Sep 4, 2022

@nicoloboschi I forgot to add ASF license, please help to approve the workflow running again, thx!

@hezhangjian hezhangjian merged commit a266c92 into apache:master Sep 5, 2022
@hangc0276
Copy link
Contributor

Good job!

@yaalsn yaalsn deleted the fix-powermock-loadclass-error branch September 5, 2022 13:32
@hangc0276 hangc0276 added this to the 4.16.0 milestone Oct 14, 2022
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
### Motivation

Fix apache#3115 

When I try to run some test classes, there will occur an error message like the above issue cause `javax/management/MBeanServer` is a system class and javassist's classloader cannot load it. we can add powermock global configuration to ignore this error message.

The powermock's instruction is here: https://github.com/powermock/powermock/wiki/PowerMock-Configuration

### Changes

Add `org/powermock/extensions/configuration.properties`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants