]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6019 Refactor rules search WS to support selectable facets
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 8 Jan 2015 11:17:58 +0000 (12:17 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 12 Jan 2015 16:32:06 +0000 (17:32 +0100)
23 files changed:
server/sonar-server/src/main/java/org/sonar/server/activity/ws/ActivityMapping.java
server/sonar-server/src/main/java/org/sonar/server/activity/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/rule/ws/RuleMapping.java
server/sonar-server/src/main/java/org/sonar/server/rule/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/search/ws/BaseMapping.java
server/sonar-server/src/main/java/org/sonar/server/search/ws/SearchRequestHandler.java
server/sonar-server/src/test/java/org/sonar/server/rule/ws/AppActionTest.java
server/sonar-server/src/test/java/org/sonar/server/rule/ws/DeleteActionTest.java
server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/filter_by_tags.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/get_note_as_markdown_and_html.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_2_rules.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_active_rules.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_active_rules_params.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_debt_rule.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_debt_rules_with_default_and_overridden_debt_values.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_debt_rules_with_default_linear_offset_and_overridden_constant_debt.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_debt_rules_with_default_linear_offset_and_overridden_linear_debt.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_no_rules.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_profile_active_rules.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_rules_from_template_key.json
server/sonar-server/src/test/resources/org/sonar/server/rule/ws/RulesWebServiceMediumTest/search_template_rules.json

index 668b072dad9aee2919f2c8f104d2e5fca2627e51..aee5b31cdc650e819aa1dbecf6b5c14ab6b052a3 100644 (file)
@@ -23,8 +23,8 @@ import org.sonar.api.utils.text.JsonWriter;
 import org.sonar.core.activity.Activity;
 import org.sonar.server.activity.index.ActivityDoc;
 import org.sonar.server.activity.index.ActivityNormalizer;
+import org.sonar.server.search.QueryContext;
 import org.sonar.server.search.ws.BaseMapping;
-import org.sonar.server.search.ws.SearchOptions;
 
 import java.util.Map;
 
@@ -51,8 +51,8 @@ public class ActivityMapping extends BaseMapping<ActivityDoc, Object> {
     });
   }
 
-  public void write(Activity activity, JsonWriter writer, SearchOptions options) {
-    doWrite((ActivityDoc)activity, null, writer, options);
+  public void write(Activity activity, JsonWriter writer, QueryContext context) {
+    doWrite((ActivityDoc) activity, null, writer, context);
   }
 
 }
index 30eab19a4bd87c83bced1c4a72112b8c1cfe78a8..256028e0209b4071a308400427d264d7c069e0e9 100644 (file)
@@ -79,14 +79,14 @@ public class SearchAction implements RequestHandler {
 
     JsonWriter json = response.newJsonWriter().beginObject();
     searchOptions.writeStatistics(json, results);
-    writeLogs(results, json, searchOptions);
+    writeLogs(results, json, queryContext);
     json.endObject().close();
   }
 
-  private void writeLogs(Result<Activity> result, JsonWriter json, SearchOptions options) {
+  private void writeLogs(Result<Activity> result, JsonWriter json, QueryContext context) {
     json.name("logs").beginArray();
     for (Activity log : result.getHits()) {
-      mapping.write(log, json, options);
+      mapping.write(log, json, context);
     }
     json.endArray();
   }
index a57469683baf1225f7d5b2011c5cd1ac9d4492b7..71244828bb75d4527ac88e6ed42e89877594446d 100644 (file)
@@ -30,8 +30,8 @@ import org.sonar.server.rule.Rule;
 import org.sonar.server.rule.RuleParam;
 import org.sonar.server.rule.index.RuleDoc;
 import org.sonar.server.rule.index.RuleNormalizer;
+import org.sonar.server.search.QueryContext;
 import org.sonar.server.search.ws.BaseMapping;
-import org.sonar.server.search.ws.SearchOptions;
 import org.sonar.server.text.MacroInterpreter;
 
 import javax.annotation.CheckForNull;
@@ -164,43 +164,43 @@ public class RuleMapping extends BaseMapping<RuleDoc, RuleMappingContext> {
     });
   }
 
-  public void write(Rule rule, JsonWriter json, @Nullable SearchOptions options) {
+  public void write(Rule rule, JsonWriter json, @Nullable QueryContext queryContext) {
     RuleMappingContext context = new RuleMappingContext();
-    if (needDebtCharacteristicNames(options)) {
+    if (needDebtCharacteristicNames(queryContext)) {
       String debtCharacteristicKey = rule.debtCharacteristicKey();
       if (debtCharacteristicKey != null) {
         // load debt characteristics if requested
         context.add(debtModel.characteristicByKey(debtCharacteristicKey));
       }
     }
-    if (needDebtSubCharacteristicNames(options)) {
+    if (needDebtSubCharacteristicNames(queryContext)) {
       String debtSubCharacteristicKey = rule.debtSubCharacteristicKey();
       if (debtSubCharacteristicKey != null) {
         context.add(debtModel.characteristicByKey(debtSubCharacteristicKey));
       }
     }
-    doWrite((RuleDoc) rule, context, json, options);
+    doWrite((RuleDoc) rule, context, json, queryContext);
   }
 
-  public void write(Collection<Rule> rules, JsonWriter json, @Nullable SearchOptions options) {
+  public void write(Collection<Rule> rules, JsonWriter json, @Nullable QueryContext queryContext) {
     if (!rules.isEmpty()) {
       RuleMappingContext context = new RuleMappingContext();
-      if (needDebtCharacteristicNames(options) || needDebtSubCharacteristicNames(options)) {
+      if (needDebtCharacteristicNames(queryContext) || needDebtSubCharacteristicNames(queryContext)) {
         // load all debt characteristics
         context.addAll(debtModel.allCharacteristics());
       }
       for (Rule rule : rules) {
-        doWrite((RuleDoc) rule, context, json, options);
+        doWrite((RuleDoc) rule, context, json, queryContext);
       }
     }
   }
 
-  private boolean needDebtCharacteristicNames(@Nullable SearchOptions options) {
-    return options == null || options.hasField("debtCharName");
+  private boolean needDebtCharacteristicNames(@Nullable QueryContext context) {
+    return context == null || context.getFieldsToReturn().contains("debtCharName");
   }
 
-  private boolean needDebtSubCharacteristicNames(@Nullable SearchOptions options) {
-    return options == null || options.hasField("debtSubCharName");
+  private boolean needDebtSubCharacteristicNames(@Nullable QueryContext context) {
+    return context == null || context.getFieldsToReturn().contains("debtSubCharName");
   }
 
   private static class CharacteristicNameMapper extends IndexMapper<RuleDoc, RuleMappingContext> {
index 0d170752d6126e23df6de0fdb35a6f06b1c31a23..88763142bca914a3a1dcf677eb59a845ebe3a9b4 100644 (file)
 package org.sonar.server.rule.ws;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableList.Builder;
 import com.google.common.io.Resources;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.server.ws.Request;
-import org.sonar.api.server.ws.RequestHandler;
-import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.api.utils.text.JsonWriter;
 import org.sonar.server.qualityprofile.ActiveRule;
@@ -37,6 +36,9 @@ import org.sonar.server.search.FacetValue;
 import org.sonar.server.search.QueryContext;
 import org.sonar.server.search.Result;
 import org.sonar.server.search.ws.SearchOptions;
+import org.sonar.server.search.ws.SearchRequestHandler;
+
+import javax.annotation.CheckForNull;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -45,7 +47,7 @@ import java.util.Map;
 /**
  * @since 4.4
  */
-public class SearchAction implements RequestHandler {
+public class SearchAction extends SearchRequestHandler<RuleQuery, Rule> {
 
   public static final String PARAM_REPOSITORIES = "repositories";
   public static final String PARAM_KEY = "rule_key";
@@ -71,32 +73,35 @@ public class SearchAction implements RequestHandler {
   private final RuleMapping mapping;
 
   public SearchAction(RuleService service, ActiveRuleCompleter activeRuleCompleter, RuleMapping mapping) {
+    super(SEARCH_ACTION);
     this.ruleService = service;
     this.activeRuleCompleter = activeRuleCompleter;
     this.mapping = mapping;
   }
 
-  void define(WebService.NewController controller) {
-    WebService.NewAction action = controller
-      .createAction(SEARCH_ACTION)
-      .setDescription("Search for a collection of relevant rules matching a specified query")
+  @Override
+  protected void doDefinition(WebService.NewAction action) {
+    action.setDescription("Search for a collection of relevant rules matching a specified query")
       .setResponseExample(Resources.getResource(getClass(), "example-search.json"))
       .setSince("4.4")
       .setHandler(this);
 
-    // Generic search parameters
-    SearchOptions.defineFieldsParam(action,
-      ImmutableList.<String>builder().addAll(mapping.supportedFields()).add("actives").build());
-    SearchOptions.definePageParams(action);
-
     // Rule-specific search parameters
     defineRuleSearchParameters(action);
+  }
 
-    // Other parameters
-    action.createParam(PARAM_FACETS)
-      .setDescription("Compute predefined facets")
-      .setBooleanPossibleValues()
-      .setDefaultValue("false");
+  @Override
+  @CheckForNull
+  protected Collection<String> possibleFacets() {
+    return Arrays.asList(new String[] {
+      "languages",
+      "repositories",
+      "tags",
+      "characteristics",
+      "severities",
+      "statuses",
+      "true"
+    });
   }
 
   /**
@@ -209,30 +214,6 @@ public class SearchAction implements RequestHandler {
       .setDefaultValue(true);
   }
 
-  @Override
-  public void handle(Request request, Response response) {
-    RuleQuery query = createRuleQuery(ruleService.newRuleQuery(), request);
-    SearchOptions searchOptions = SearchOptions.create(request);
-    QueryContext queryContext = mapping.newQueryOptions(searchOptions);
-    Boolean facets = request.paramAsBoolean(PARAM_FACETS);
-    if (facets != null && facets) {
-      queryContext.addFacets(Arrays.asList("languages", "repositories", "tags"));
-    }
-
-    Result<Rule> results = ruleService.search(query, queryContext);
-
-    JsonWriter json = response.newJsonWriter().beginObject();
-    searchOptions.writeStatistics(json, results);
-    writeRules(results, json, searchOptions);
-    if (searchOptions.hasField("actives")) {
-      activeRuleCompleter.completeSearch(query, results.getHits(), json);
-    }
-    if (queryContext.isFacet()) {
-      writeFacets(results, json);
-    }
-    json.endObject().close();
-  }
-
   public static RuleQuery createRuleQuery(RuleQuery query, Request request) {
     query.setQueryText(request.param(SearchOptions.PARAM_TEXT_QUERY));
     query.setSeverities(request.paramAsStrings(PARAM_SEVERITIES));
@@ -259,10 +240,10 @@ public class SearchAction implements RequestHandler {
     return query;
   }
 
-  private void writeRules(Result<Rule> result, JsonWriter json, SearchOptions options) {
+  private void writeRules(Result<Rule> result, JsonWriter json, QueryContext context) {
     json.name("rules").beginArray();
     for (Rule rule : result.getHits()) {
-      mapping.write(rule, json, options);
+      mapping.write(rule, json, context);
     }
     json.endArray();
   }
@@ -283,4 +264,42 @@ public class SearchAction implements RequestHandler {
     }
     json.endArray();
   }
+
+  @Override
+  protected QueryContext getQueryContext(Request request) {
+    // TODO Get rid of this horrible hack: fields on request are not the same as fields for ES search ! 1/2
+    return mapping.newQueryOptions(SearchOptions.create(request));
+  }
+
+  @Override
+  protected Result<Rule> doSearch(RuleQuery query, QueryContext context) {
+    return ruleService.search(query, context);
+  }
+
+  @Override
+  protected RuleQuery doQuery(Request request) {
+    return createRuleQuery(ruleService.newRuleQuery(), request);
+  }
+
+  @Override
+  protected void doContextResponse(Request request, QueryContext context, Result<Rule> result, JsonWriter json) {
+    // TODO Get rid of this horrible hack: fields on request are not the same as fields for ES search ! 2/2
+    QueryContext contextForResponse = super.getQueryContext(request);
+    writeRules(result, json, contextForResponse);
+    if (contextForResponse.getFieldsToReturn().contains("actives")) {
+      activeRuleCompleter.completeSearch(doQuery(request), result.getHits(), json);
+    }
+    if (contextForResponse.isFacet()) {
+      writeFacets(result, json);
+    }
+  }
+
+  @Override
+  protected Collection<String> possibleFields() {
+    Builder<String> builder = ImmutableList.<String>builder();
+    if (mapping != null) {
+      builder.addAll(mapping.supportedFields());
+    }
+    return builder.add("actives").build();
+  }
 }
index 6af489f43f94a82693732b962746c35240705841..68eb0ec5d8cc5fd313ef3d575e9337fdb609b689 100644 (file)
@@ -70,16 +70,16 @@ public abstract class BaseMapping<DOC extends BaseDoc, CTX> implements ServerCom
   /**
    * Write only requested document fields
    */
-  protected void doWrite(DOC doc, @Nullable CTX context, JsonWriter json, @Nullable SearchOptions options) {
+  protected void doWrite(DOC doc, @Nullable CTX context, JsonWriter json, @Nullable QueryContext queryContext) {
     json.beginObject();
     json.prop("key", doc.keyField());
-    if (options == null || options.fields() == null) {
+    if (queryContext == null || queryContext.getFieldsToReturn().isEmpty()) {
       // return all fields
       for (Mapper mapper : mappers.values()) {
         mapper.write(json, doc, context);
       }
     } else {
-      for (String optionField : options.fields()) {
+      for (String optionField : queryContext.getFieldsToReturn()) {
         for (Mapper mapper : mappers.get(optionField)) {
           mapper.write(json, doc, context);
         }
index ef0ae5ff8663075bdabdb013767e62a3af5d04d0..e30bdcbc299e9acb23a57b39274d2bf397ad5dac 100644 (file)
@@ -120,7 +120,7 @@ public abstract class SearchRequestHandler<QUERY, DOMAIN> implements RequestHand
     json.endObject().close();
   }
 
-  private QueryContext getQueryContext(Request request) {
+  protected QueryContext getQueryContext(Request request) {
     int pageSize = request.mandatoryParamAsInt(PARAM_PAGE_SIZE);
     QueryContext queryContext = new QueryContext().addFieldsToReturn(request.paramAsStrings(PARAM_FIELDS));
     List<String> facets = request.paramAsStrings(PARAM_FACETS);
index fa7103646a92b393589def1b75db9149a0ddbeed..c40bde946aea0f6630efc844a2f17972296e53be 100644 (file)
@@ -35,7 +35,6 @@ import org.sonar.api.server.debt.internal.DefaultDebtCharacteristic;
 import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.core.qualityprofile.db.QualityProfileDto;
 import org.sonar.server.qualityprofile.QProfileLoader;
-import org.sonar.server.qualityprofile.QProfileService;
 import org.sonar.server.qualityprofile.QProfileTesting;
 import org.sonar.server.rule.RuleRepositories;
 import org.sonar.server.user.MockUserSession;
@@ -70,7 +69,7 @@ public class AppActionTest {
   public void should_generate_app_init_info() throws Exception {
     AppAction app = new AppAction(languages, ruleRepositories, i18n, debtModel, profileLoader);
     WsTester tester = new WsTester(new RulesWebService(
-      mock(SearchAction.class), mock(ShowAction.class), mock(TagsAction.class), mock(CreateAction.class),
+      new SearchAction(null, null, null), mock(ShowAction.class), mock(TagsAction.class), mock(CreateAction.class),
       app, mock(UpdateAction.class), mock(DeleteAction.class)));
 
     MockUserSession.set().setGlobalPermissions(GlobalPermissions.QUALITY_PROFILE_ADMIN);
index d497363eaea602f697daf94051ceaa655533b939..5043126e12f1d474b9420cea37bb5b341443e5ae 100644 (file)
@@ -42,7 +42,7 @@ public class DeleteActionTest {
 
   @Before
   public void setUp() throws Exception {
-    tester = new WsTester(new RulesWebService(mock(SearchAction.class), mock(ShowAction.class), mock(TagsAction.class), mock(CreateAction.class), mock(AppAction.class),
+    tester = new WsTester(new RulesWebService(new SearchAction(null, null, null), mock(ShowAction.class), mock(TagsAction.class), mock(CreateAction.class), mock(AppAction.class),
       mock(UpdateAction.class), new DeleteAction(ruleService)));
   }
 
index 2144994aaa7a1c49753270ffac4e937bc28d9bfb..e7299ab3c100b11047f5210c77b04b6621ff4b47 100644 (file)
@@ -135,7 +135,7 @@ public class RulesWebServiceMediumTest {
   public void search_no_rules() throws Exception {
     MockUserSession.set();
     WsTester.TestRequest request = tester.wsTester().newGetRequest(API_ENDPOINT, API_SEARCH_METHOD);
-
+    request.setParam(SearchOptions.PARAM_FIELDS, "actives");
     WsTester.Result result = request.execute();
 
     result.assertJson(this.getClass(), "search_no_rules.json");
@@ -150,14 +150,15 @@ public class RulesWebServiceMediumTest {
     MockUserSession.set();
     WsTester.TestRequest request = tester.wsTester().newGetRequest(API_ENDPOINT, API_SEARCH_METHOD);
     request.setParam(SearchAction.PARAM_KEY, RuleTesting.XOO_X1.toString());
-    request.setParam(SearchOptions.PARAM_FIELDS, "");
+    request.setParam(SearchOptions.PARAM_FIELDS, "actives");
     WsTester.Result result = request.execute();
-    result.assertJson("{\"total\":1,\"p\":1,\"ps\":10,\"rules\":[{\"key\":\"xoo:x1\"}]}");
+    result.assertJson("{\"total\":1,\"p\":1,\"ps\":100,\"rules\":[{\"key\":\"xoo:x1\"}]}", false);
 
     request = tester.wsTester().newGetRequest(API_ENDPOINT, API_SEARCH_METHOD);
     request.setParam(SearchAction.PARAM_KEY, RuleKey.of("xoo", "unknown").toString());
+    request.setParam(SearchOptions.PARAM_FIELDS, "actives");
     result = request.execute();
-    result.assertJson("{\"total\":0,\"p\":1,\"ps\":10,\"rules\":[],\"actives\":{}}");
+    result.assertJson("{\"total\":0,\"p\":1,\"ps\":100,\"rules\":[],\"actives\":{}}", false);
 
   }
 
@@ -319,7 +320,7 @@ public class RulesWebServiceMediumTest {
     request.setParam(SearchOptions.PARAM_FIELDS, "");
     WsTester.Result result = request.execute();
 
-    result.assertJson(this.getClass(), "search_active_rules.json");
+    result.assertJson(this.getClass(), "search_active_rules.json", false);
   }
 
   @Test
@@ -349,7 +350,7 @@ public class RulesWebServiceMediumTest {
     request.setParam(SearchAction.PARAM_QPROFILE, profile2.getKey());
     request.setParam(SearchOptions.PARAM_FIELDS, "");
     WsTester.Result result = request.execute();
-    result.assertJson(this.getClass(), "search_profile_active_rules.json");
+    result.assertJson(this.getClass(), "search_profile_active_rules.json", false);
   }
 
   @Test
@@ -467,7 +468,7 @@ public class RulesWebServiceMediumTest {
     request.setParam(SearchOptions.PARAM_ASCENDING, "true");
 
     WsTester.Result result = request.execute();
-    result.assertJson("{\"total\":3,\"p\":1,\"ps\":10,\"rules\":[{\"key\":\"xoo:x2\"},{\"key\":\"xoo:x1\"},{\"key\":\"xoo:x3\"}]}");
+    result.assertJson("{\"total\":3,\"p\":1,\"ps\":100,\"rules\":[{\"key\":\"xoo:x2\"},{\"key\":\"xoo:x1\"},{\"key\":\"xoo:x3\"}]}", false);
 
     // 2. Sort Name DESC
     request = tester.wsTester().newGetRequest(API_ENDPOINT, API_SEARCH_METHOD);
@@ -476,7 +477,7 @@ public class RulesWebServiceMediumTest {
     request.setParam(SearchOptions.PARAM_ASCENDING, "false");
 
     result = request.execute();
-    result.assertJson("{\"total\":3,\"p\":1,\"ps\":10,\"rules\":[{\"key\":\"xoo:x3\"},{\"key\":\"xoo:x1\"},{\"key\":\"xoo:x2\"}]}");
+    result.assertJson("{\"total\":3,\"p\":1,\"ps\":100,\"rules\":[{\"key\":\"xoo:x3\"},{\"key\":\"xoo:x1\"},{\"key\":\"xoo:x2\"}]}", false);
 
   }
 
@@ -496,7 +497,7 @@ public class RulesWebServiceMediumTest {
     request.setParam(SearchAction.PARAM_AVAILABLE_SINCE, DateUtils.formatDate(since));
     request.setParam(SearchOptions.PARAM_SORT, RuleNormalizer.RuleField.KEY.field());
     WsTester.Result result = request.execute();
-    result.assertJson("{\"total\":2,\"p\":1,\"ps\":10,\"rules\":[{\"key\":\"xoo:x1\"},{\"key\":\"xoo:x2\"}]}");
+    result.assertJson("{\"total\":2,\"p\":1,\"ps\":100,\"rules\":[{\"key\":\"xoo:x1\"},{\"key\":\"xoo:x2\"}]}", false);
 
     Calendar c = Calendar.getInstance();
     c.setTime(since);
@@ -508,7 +509,7 @@ public class RulesWebServiceMediumTest {
     request.setParam(SearchOptions.PARAM_FIELDS, "");
     request.setParam(SearchAction.PARAM_AVAILABLE_SINCE, DateUtils.formatDate(c.getTime()));
     result = request.execute();
-    result.assertJson("{\"total\":0,\"p\":1,\"ps\":10,\"rules\":[]}");
+    result.assertJson("{\"total\":0,\"p\":1,\"ps\":100,\"rules\":[]}");
   }
 
   private ActiveRuleDto newActiveRule(QualityProfileDto profile, RuleDto rule) {
index 0ae7b212cc02d6ee7a0ff012ba1f46e73ed62974..ac0347c9efda1d8e5472509be62f31c959d4779d 100644 (file)
@@ -177,8 +177,12 @@ public class WsTester {
     }
 
     public Result assertJson(String expectedJson) throws Exception {
+      return assertJson(expectedJson, true);
+    }
+
+    public Result assertJson(String expectedJson, boolean strict) throws Exception {
       String json = outputAsString();
-      JSONAssert.assertEquals(expectedJson, json, true);
+      JSONAssert.assertEquals(expectedJson, json, strict);
       return this;
     }
 
index 48cf5810a0b0ba0af24921380e1a6b11eff8d8b3..a1bf812f7a374c23533a9a53fb3661b857c60738 100644 (file)
@@ -1,4 +1,4 @@
-{"total": 1, "p": 1, "ps": 10, "rules": [
+{"total": 1, "p": 1, "ps": 100, "rules": [
   {
     "key": "xoo:x1",
     "sysTags": ["tag1"],
index b75c785b5cacacd140d19ec540e8147192df7bdd..bd84f45871ebd6d2f63208fe52751bae4a7254cc 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "total": 2, "p": 1, "ps": 10,
+  "total": 2, "p": 1, "ps": 100,
   "rules": [
     {
       "key": "xoo:x2",
@@ -35,5 +35,4 @@
       "lang": "xoo",
       "params": []
     }
-  ],
-  "actives": {}}
+  ]}
index 3f83f0921a36f9b494799df285f222dbfba36dae..474f4f219b5e15d43a57623002861b9c06f6ffea 100644 (file)
@@ -1,4 +1,4 @@
-{"total": 1, "p": 1, "ps": 10, "rules": [
+{"total": 1, "p": 1, "ps": 100, "rules": [
   {
     "key": "xoo:x1",
     "debtChar": "RELIABILITY",