| |
@@ -1,96 +1,96 @@
|
| |
- From f6eb583525c7f777bde16182c57a47345fd53cb0 Mon Sep 17 00:00:00 2001
|
| |
+ From 36e88235cc6cb2bdd335f004cae0356662f2d22b Mon Sep 17 00:00:00 2001
|
| |
From: Marian Koncek <mkoncek@redhat.com>
|
| |
- Date: Thu, 5 Sep 2019 15:21:04 +0200
|
| |
- Subject: [PATCH] Remove dependency on powermock
|
| |
+ Date: Mon, 25 May 2020 12:14:29 +0200
|
| |
+ Subject: [PATCH 4/4] remove dependency on powermock
|
| |
|
| |
---
|
| |
.../StringSearchModelInterpolatorTest.java | 66 -------------------
|
| |
1 file changed, 66 deletions(-)
|
| |
|
| |
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
|
| |
- index b66abca..a5b2aa0 100644
|
| |
+ index 45800d6..fbf3b23 100644
|
| |
--- a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
|
| |
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
|
| |
@@ -36,8 +36,6 @@ import java.util.concurrent.FutureTask;
|
| |
- import static org.hamcrest.CoreMatchers.anyOf;
|
| |
- import static org.hamcrest.CoreMatchers.is;
|
| |
- import static org.junit.Assert.assertThat;
|
| |
- -import static org.powermock.reflect.Whitebox.getField;
|
| |
- -import static org.powermock.reflect.Whitebox.getInternalState;
|
| |
-
|
| |
- /**
|
| |
- * @author jdcasey
|
| |
+ import static org.hamcrest.CoreMatchers.anyOf;
|
| |
+ import static org.hamcrest.CoreMatchers.is;
|
| |
+ import static org.junit.Assert.assertThat;
|
| |
+ -import static org.powermock.reflect.Whitebox.getField;
|
| |
+ -import static org.powermock.reflect.Whitebox.getInternalState;
|
| |
+
|
| |
+ /**
|
| |
+ * @author jdcasey
|
| |
@@ -374,70 +372,6 @@ public class StringSearchModelInterpolatorTest
|
| |
- ) ) );
|
| |
- }
|
| |
-
|
| |
- - public void testNotInterpolateObjectWithFile()
|
| |
- - throws Exception
|
| |
- - {
|
| |
- - Model model = new Model();
|
| |
- -
|
| |
- - File baseDir = new File( System.getProperty( "user.dir" ) );
|
| |
- -
|
| |
- - Properties p = new Properties();
|
| |
- -
|
| |
- - ObjectWithNotInterpolatedFile obj = new ObjectWithNotInterpolatedFile( baseDir );
|
| |
- -
|
| |
- - StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
|
| |
- -
|
| |
- - ModelBuildingRequest config = createModelBuildingRequest( p );
|
| |
- -
|
| |
- - SimpleProblemCollector collector = new SimpleProblemCollector();
|
| |
- - interpolator.interpolateObject( obj, model, new File( "." ), config, collector );
|
| |
- - assertProblemFree( collector );
|
| |
- -
|
| |
- - //noinspection unchecked
|
| |
- - Map<Class<?>, ?> cache =
|
| |
- - (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
|
| |
- - .get( null );
|
| |
- -
|
| |
- - Object objCacheItem = cache.get( Object.class );
|
| |
- - Object fileCacheItem = cache.get( File.class );
|
| |
- -
|
| |
- - assertNotNull( objCacheItem );
|
| |
- - assertNotNull( fileCacheItem );
|
| |
- -
|
| |
- - assertThat( ( (Object[]) getInternalState( objCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
- - assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
- - }
|
| |
- -
|
| |
- - public void testNotInterpolateFile()
|
| |
- - throws Exception
|
| |
- - {
|
| |
- - Model model = new Model();
|
| |
- -
|
| |
- - File baseDir = new File( System.getProperty( "user.dir" ) );
|
| |
- -
|
| |
- - Properties p = new Properties();
|
| |
- -
|
| |
- - StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
|
| |
- -
|
| |
- - ModelBuildingRequest config = createModelBuildingRequest( p );
|
| |
- -
|
| |
- - SimpleProblemCollector collector = new SimpleProblemCollector();
|
| |
- - interpolator.interpolateObject( baseDir, model, new File( "." ), config, collector );
|
| |
- - assertProblemFree( collector );
|
| |
- -
|
| |
- - //noinspection unchecked
|
| |
- - Map<Class<?>, ?> cache =
|
| |
- - (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
|
| |
- - .get( null );
|
| |
- -
|
| |
- - Object fileCacheItem = cache.get( File.class );
|
| |
- -
|
| |
- - assertNotNull( fileCacheItem );
|
| |
- -
|
| |
- - assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
- - }
|
| |
- -
|
| |
- -
|
| |
- public void testConcurrentInterpolation()
|
| |
- throws Exception
|
| |
- {
|
| |
+ ) ) );
|
| |
+ }
|
| |
+
|
| |
+ - public void testNotInterpolateObjectWithFile()
|
| |
+ - throws Exception
|
| |
+ - {
|
| |
+ - Model model = new Model();
|
| |
+ -
|
| |
+ - File baseDir = new File( System.getProperty( "user.dir" ) );
|
| |
+ -
|
| |
+ - Properties p = new Properties();
|
| |
+ -
|
| |
+ - ObjectWithNotInterpolatedFile obj = new ObjectWithNotInterpolatedFile( baseDir );
|
| |
+ -
|
| |
+ - StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
|
| |
+ -
|
| |
+ - ModelBuildingRequest config = createModelBuildingRequest( p );
|
| |
+ -
|
| |
+ - SimpleProblemCollector collector = new SimpleProblemCollector();
|
| |
+ - interpolator.interpolateObject( obj, model, new File( "." ), config, collector );
|
| |
+ - assertProblemFree( collector );
|
| |
+ -
|
| |
+ - //noinspection unchecked
|
| |
+ - Map<Class<?>, ?> cache =
|
| |
+ - (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
|
| |
+ - .get( null );
|
| |
+ -
|
| |
+ - Object objCacheItem = cache.get( Object.class );
|
| |
+ - Object fileCacheItem = cache.get( File.class );
|
| |
+ -
|
| |
+ - assertNotNull( objCacheItem );
|
| |
+ - assertNotNull( fileCacheItem );
|
| |
+ -
|
| |
+ - assertThat( ( (Object[]) getInternalState( objCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
+ - assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
+ - }
|
| |
+ -
|
| |
+ - public void testNotInterpolateFile()
|
| |
+ - throws Exception
|
| |
+ - {
|
| |
+ - Model model = new Model();
|
| |
+ -
|
| |
+ - File baseDir = new File( System.getProperty( "user.dir" ) );
|
| |
+ -
|
| |
+ - Properties p = new Properties();
|
| |
+ -
|
| |
+ - StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
|
| |
+ -
|
| |
+ - ModelBuildingRequest config = createModelBuildingRequest( p );
|
| |
+ -
|
| |
+ - SimpleProblemCollector collector = new SimpleProblemCollector();
|
| |
+ - interpolator.interpolateObject( baseDir, model, new File( "." ), config, collector );
|
| |
+ - assertProblemFree( collector );
|
| |
+ -
|
| |
+ - //noinspection unchecked
|
| |
+ - Map<Class<?>, ?> cache =
|
| |
+ - (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
|
| |
+ - .get( null );
|
| |
+ -
|
| |
+ - Object fileCacheItem = cache.get( File.class );
|
| |
+ -
|
| |
+ - assertNotNull( fileCacheItem );
|
| |
+ -
|
| |
+ - assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
+ - }
|
| |
+ -
|
| |
+ -
|
| |
+ public void testConcurrentInterpolation()
|
| |
+ throws Exception
|
| |
+ {
|
| |
--
|
| |
- 2.21.0
|
| |
+ 2.26.2
|
| |
|
| |
Test rebuilds were done in COPR:
https://copr.fedorainfracloud.org/coprs/decathorpe/maven-3.6.3-pr/monitor/
There were 24 build failures, which are unrelated and pre-existing to this change, and 399 build successes.
(Retiring those F32FBTFS packages really cleaned things up)