ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [34/50] [abbrv] ambari git commit: AMBARI-21033 ADDENDUM - Log Search use POJOs for input configuration (oleewere)
Date Wed, 24 May 2017 02:39:51 GMT
AMBARI-21033 ADDENDUM - Log Search use POJOs for input configuration (oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0626b789
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0626b789
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0626b789

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 0626b789ba477c494dc5a260b2bca61e3d906690
Parents: 6c68321
Author: oleewere <oleewere@gmail.com>
Authored: Mon May 22 20:31:16 2017 +0200
Committer: oleewere <oleewere@gmail.com>
Committed: Mon May 22 20:31:24 2017 +0200

----------------------------------------------------------------------
 .../config/api/LogSearchConfigFactoryTest.java      | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0626b789/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
index 8e7154e..425694f 100644
--- a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
+++ b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java
@@ -20,14 +20,12 @@
 package org.apache.ambari.logsearch.config.api;
 
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 
-import org.apache.ambari.logsearch.config.api.LogSearchConfig;
-import org.apache.ambari.logsearch.config.api.LogSearchConfigFactory;
 import org.apache.ambari.logsearch.config.api.LogSearchConfig.Component;
 import org.junit.Test;
 
-import com.google.common.collect.ImmutableMap;
-
 import junit.framework.Assert;
 
 public class LogSearchConfigFactoryTest {
@@ -42,17 +40,19 @@ public class LogSearchConfigFactoryTest {
 
   @Test
   public void testCustomConfig() throws Exception {
+    Map<String, String> logsearchConfClassMap = new HashMap<>();
+    logsearchConfClassMap.put("logsearch.config.class", "org.apache.ambari.logsearch.config.api.LogSearchConfigClass2");
     LogSearchConfig config = LogSearchConfigFactory.createLogSearchConfig(Component.SERVER,
-        ImmutableMap.of("logsearch.config.class", "org.apache.ambari.logsearch.config.api.LogSearchConfigClass2"),
-        LogSearchConfigClass1.class);
+      logsearchConfClassMap, LogSearchConfigClass1.class);
     
     Assert.assertSame(config.getClass(), LogSearchConfigClass2.class);
   }
   
   @Test(expected = IllegalArgumentException.class)
   public void testNonConfigClass() throws Exception {
+    Map<String, String> logsearchConfClassMap = new HashMap<>();
+    logsearchConfClassMap.put("logsearch.config.class", "org.apache.ambari.logsearch.config.api.NonLogSearchConfigClass");
     LogSearchConfigFactory.createLogSearchConfig(Component.SERVER,
-        ImmutableMap.of("logsearch.config.class", "org.apache.ambari.logsearch.config.api.NonLogSearchConfigClass"),
-        LogSearchConfigClass1.class);
+      logsearchConfClassMap, LogSearchConfigClass1.class);
   }
 }


Mime
View raw message