Skip to content

Commit

Permalink
Disable Objenesis cache using a custom MockitoConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmladenov committed Jul 15, 2024
1 parent 143c8fa commit b9b51ad
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.mockito.configuration;

// The presence of this class configures Mockito to disable the Objenesis cache.
// Caching causes problems when we dynamically replace classes in meta tests.

@SuppressWarnings("unused")
public class MockitoConfiguration extends DefaultMockitoConfiguration {
@Override
public boolean enableClassCache() {
return false;
}
}

0 comments on commit b9b51ad

Please sign in to comment.