This is an automated email from the ASF dual-hosted git repository.

ckozak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new 86ff9c9  Fix PluginCacheTest cherry-pick
86ff9c9 is described below

commit 86ff9c9f7e7b6bb8edc12817704bd40e94bf4136
Author: Carter Kozak <[email protected]>
AuthorDate: Wed Dec 25 10:58:40 2019 -0500

    Fix PluginCacheTest cherry-pick
---
 .../logging/log4j}/plugins/processor/PluginCacheTest.java   | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCacheTest.java
 
b/log4j-plugins/src/test/java/org/apache/logging/log4j/plugins/processor/PluginCacheTest.java
similarity index 85%
rename from 
log4j-core/src/test/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCacheTest.java
rename to 
log4j-plugins/src/test/java/org/apache/logging/log4j/plugins/processor/PluginCacheTest.java
index c773908..4a56066 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCacheTest.java
+++ 
b/log4j-plugins/src/test/java/org/apache/logging/log4j/plugins/processor/PluginCacheTest.java
@@ -15,16 +15,15 @@
  * limitations under the license.
  */
 
-package org.apache.logging.log4j.core.config.plugins.processor;
+package org.apache.logging.log4j.plugins.processor;
 
-import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -47,7 +46,7 @@ public class PluginCacheTest {
         assertEquals(cacheB.getAllCategories().size(), 2);
         assertEquals(cacheB.getAllCategories().get("one").size(), 3);
         assertEquals(cacheB.getAllCategories().get("two").size(), 3);
-        assertArrayEquals(cacheData(cacheA), cacheData(cacheB));
+        assertEquals(Objects.toString(cacheA.getAllCategories()), 
Objects.toString(cacheB.getAllCategories()));
     }
 
     private void createCategory(PluginCache cache, String categoryName, 
List<String> entryNames) {
@@ -62,10 +61,4 @@ public class PluginCacheTest {
         }
     }
 
-    private byte[] cacheData(PluginCache cache) throws IOException {
-        ByteArrayOutputStream outputB = new ByteArrayOutputStream();
-        cache.writeCache(outputB);
-        return outputB.toByteArray();
-    }
-
 }

Reply via email to