You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2017/02/17 22:57:21 UTC

[43/51] [abbrv] ambari git commit: AMBARI-19863 ADDENDUM Fix Log Search User Config bugs (mgergely)

AMBARI-19863 ADDENDUM Fix Log Search User Config bugs (mgergely)

Change-Id: I929e2f07128cfcd5b0ce710e282c75384b4aac0d
(cherry picked from commit ea50bd7b68caf590dadd26bae182c46734985ccb)


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

Branch: refs/heads/branch-feature-BUG-74026
Commit: 168f2649958d1f2e1a9dabdb9c38fc1c0d81d688
Parents: a34d6dc
Author: Miklos Gergely <mg...@hortonworks.com>
Authored: Tue Feb 7 11:25:10 2017 +0100
Committer: Zuul <re...@hortonworks.com>
Committed: Tue Feb 7 08:29:31 2017 -0800

----------------------------------------------------------------------
 .../converter/UserConfigRequestQueryConverterTest.java   | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/168f2649/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java
index a126df8..cbfab4f 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java
@@ -18,9 +18,7 @@
  */
 package org.apache.ambari.logsearch.converter;
 
-import org.apache.ambari.logsearch.common.LogSearchContext;
 import org.apache.ambari.logsearch.model.request.impl.UserConfigRequest;
-import org.apache.ambari.logsearch.web.model.User;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.junit.Before;
 import org.junit.Test;
@@ -42,17 +40,10 @@ public class UserConfigRequestQueryConverterTest extends AbstractRequestConverte
     UserConfigRequest request = new UserConfigRequest();
     request.setRowType("myRowType"); // TODO: validate these 3 fields @Valid on UserConfigRequest object -> not null
     request.setFilterName("myFilterName");
-    
-    LogSearchContext context = new LogSearchContext();
-    User user = new User();
-    user.setUsername("myUserId");
-    context.setUser(user);
-    LogSearchContext.setContext(context);
     // WHEN
     SolrQuery queryResult = underTest.convert(request);
     // THEN
-    assertEquals("?q=*%3A*&fq=rowtype%3AmyRowType&fq=username%3AmyUserId+OR+share_username_list%3AmyUserId" +
-      "&fq=filtername%3A*myFilterName*&start=0&rows=10&sort=filtername+asc",
+    assertEquals("?q=*%3A*&fq=rowtype%3AmyRowType&fq=filtername%3A*myFilterName*&start=0&rows=10&sort=filtername+asc",
       queryResult.toQueryString());
   }
 }