lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpg...@apache.org
Subject [14/20] lucene-solr:branch_7x: SOLR-11145, SOLR-11146: Added comprehensive unit tests for Analytics Component 2.0 as well as analytics bug fixes.
Date Tue, 17 Oct 2017 18:08:33 GMT
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a6d1681a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetCloudTest.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetCloudTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetCloudTest.java
deleted file mode 100644
index d4ffb40..0000000
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetCloudTest.java
+++ /dev/null
@@ -1,1212 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.analytics.facet;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.solr.client.solrj.request.UpdateRequest;
-import org.apache.solr.common.util.NamedList;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-
-public class FieldFacetCloudTest extends AbstractAnalyticsFacetCloudTest {
-  public static final int INT = 71;
-  public static final int LONG = 36;
-  public static final int LONGM = 50;
-  public static final int FLOAT = 73;
-  public static final int FLOATM = 84;
-  public static final int DOUBLE = 49;
-  public static final int DATE = 12;
-  public static final int DATEM = 30;
-  public static final int STRING = 29;
-  public static final int STRINGM = 41;
-  public static final int NUM_LOOPS = 100;
-  
-  //INT
-  private static ArrayList<ArrayList<Integer>> intDateTestStart; 
-  private static ArrayList<Long> intDateTestMissing; 
-  private static ArrayList<ArrayList<Integer>> intStringTestStart; 
-  private static ArrayList<Long> intStringTestMissing; 
-  
-  //LONG
-  private static ArrayList<ArrayList<Long>> longDateTestStart; 
-  private static ArrayList<Long> longDateTestMissing; 
-  private static ArrayList<ArrayList<Long>> longStringTestStart; 
-  private static ArrayList<Long> longStringTestMissing; 
-  
-  //FLOAT
-  private static ArrayList<ArrayList<Float>> floatDateTestStart; 
-  private static ArrayList<Long> floatDateTestMissing; 
-  private static ArrayList<ArrayList<Float>> floatStringTestStart; 
-  private static ArrayList<Long> floatStringTestMissing; 
-  
-  //DOUBLE
-  private static ArrayList<ArrayList<Double>> doubleDateTestStart; 
-  private static ArrayList<Long> doubleDateTestMissing; 
-  private static ArrayList<ArrayList<Double>> doubleStringTestStart; 
-  private static ArrayList<Long> doubleStringTestMissing; 
-  
-  //DATE
-  private static ArrayList<ArrayList<String>> dateIntTestStart; 
-  private static ArrayList<Long> dateIntTestMissing; 
-  private static ArrayList<ArrayList<String>> dateLongTestStart; 
-  private static ArrayList<Long> dateLongTestMissing; 
-  
-  //String
-  private static ArrayList<ArrayList<String>> stringIntTestStart; 
-  private static ArrayList<Long> stringIntTestMissing; 
-  private static ArrayList<ArrayList<String>> stringLongTestStart; 
-  private static ArrayList<Long> stringLongTestMissing; 
-  
-  //Multi-Valued
-  private static ArrayList<ArrayList<Integer>> multiLongTestStart; 
-  private static ArrayList<Long> multiLongTestMissing; 
-  private static ArrayList<ArrayList<Integer>> multiStringTestStart; 
-  private static ArrayList<Long> multiStringTestMissing; 
-  private static ArrayList<ArrayList<Integer>> multiDateTestStart; 
-  private static ArrayList<Long> multiDateTestMissing; 
-  
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    setupCluster();
-
-    //INT
-    intDateTestStart = new ArrayList<>();
-    intDateTestMissing = new ArrayList<>();
-    intStringTestStart = new ArrayList<>();
-    intStringTestMissing = new ArrayList<>();
-    
-    //LONG
-    longDateTestStart = new ArrayList<>();
-    longDateTestMissing = new ArrayList<>();
-    longStringTestStart = new ArrayList<>();
-    longStringTestMissing = new ArrayList<>();
-    
-    //FLOAT
-    floatDateTestStart = new ArrayList<>();
-    floatDateTestMissing = new ArrayList<>();
-    floatStringTestStart = new ArrayList<>();
-    floatStringTestMissing = new ArrayList<>();
-    
-    //DOUBLE
-    doubleDateTestStart = new ArrayList<>();
-    doubleDateTestMissing = new ArrayList<>();
-    doubleStringTestStart = new ArrayList<>();
-    doubleStringTestMissing = new ArrayList<>();
-    
-    //DATE
-    dateIntTestStart = new ArrayList<>();
-    dateIntTestMissing = new ArrayList<>();
-    dateLongTestStart = new ArrayList<>();
-    dateLongTestMissing = new ArrayList<>();
-    
-    //String
-    stringIntTestStart = new ArrayList<>();
-    stringIntTestMissing = new ArrayList<>();
-    stringLongTestStart = new ArrayList<>();
-    stringLongTestMissing = new ArrayList<>();
-    
-    //Multi-Valued
-    multiLongTestStart = new ArrayList<>();
-    multiLongTestMissing = new ArrayList<>();
-    multiStringTestStart = new ArrayList<>();
-    multiStringTestMissing = new ArrayList<>();
-    multiDateTestStart = new ArrayList<>();
-    multiDateTestMissing = new ArrayList<>();
-    
-    boolean multiCanHaveDuplicates = Boolean.getBoolean(NUMERIC_POINTS_SYSPROP);
-
-    UpdateRequest req = new UpdateRequest();
-    for (int j = 0; j < NUM_LOOPS; ++j) {
-      int i = j%INT;
-      long l = j%LONG;
-      long lm = j%LONGM;
-      float f = j%FLOAT;
-      double d = j%DOUBLE;
-      int dt = j%DATE;
-      int dtm = j%DATEM;
-      int s = j%STRING;
-      int sm = j%STRINGM;
-
-      List<String> fields = new ArrayList<>();
-      fields.add("id"); fields.add("1000"+j);
-      
-      if( i != 0 ) {
-        fields.add("int_id"); fields.add("" + i);
-      }
-      if( l != 0l ) {
-        fields.add("long_ld"); fields.add("" + l);
-        fields.add("long_ldm"); fields.add("" + l);
-      }
-      if( lm != 0l ) {
-        fields.add("long_ldm"); fields.add("" + lm);
-      }
-      if( f != 0.0f ) {
-        fields.add("float_fd"); fields.add("" + f);
-      }
-      if( d != 0.0d ) {
-        fields.add("double_dd"); fields.add("" + d);
-      }
-      if( dt != 0 ) {
-        fields.add("date_dtd"); fields.add((1800+dt) + "-12-31T23:59:59Z");
-        fields.add("date_dtdm"); fields.add((1800+dt) + "-12-31T23:59:59Z");
-      }
-      if ( dtm != 0 ) {
-        fields.add("date_dtdm"); fields.add((1800+dtm) + "-12-31T23:59:59Z");
-      }
-      if ( s != 0 ) {
-        fields.add("string_sd"); fields.add("str" + s);
-        fields.add("string_sdm"); fields.add("str" + s);
-      }
-      if ( sm != 0 ) {
-        fields.add("string_sdm"); fields.add("str" + sm);
-      }
-      req.add(fields.toArray(new String[0]));
-      
-      if( dt != 0 ) {
-        //Dates
-        if ( j-DATE < 0 ) {
-          ArrayList<Integer> list1 = new ArrayList<>();
-          if( i != 0 ) {
-            list1.add(i);
-            intDateTestMissing.add(0l);
-          } else {
-            intDateTestMissing.add(1l);
-          }
-          intDateTestStart.add(list1);
-          ArrayList<Long> list2 = new ArrayList<>();
-          if( l != 0l ) {
-            list2.add(l);
-            longDateTestMissing.add(0l);
-          } else {
-            longDateTestMissing.add(1l);
-          }
-          longDateTestStart.add(list2);
-          ArrayList<Float> list3 = new ArrayList<>();
-          if ( f != 0.0f ) {
-            list3.add(f);
-            floatDateTestMissing.add(0l);
-          } else {
-            floatDateTestMissing.add(1l);
-            
-          }
-          floatDateTestStart.add(list3);
-          ArrayList<Double> list4 = new ArrayList<>();
-          if( d != 0.0d ) {
-            list4.add(d);
-            doubleDateTestMissing.add(0l);
-          } else {
-            doubleDateTestMissing.add(1l);
-          }
-          doubleDateTestStart.add(list4);
-          ArrayList<Integer> list5 = new ArrayList<>();
-          if( i != 0 ) {
-            list5.add(i);
-            multiDateTestMissing.add(0l);
-          } else {
-            multiDateTestMissing.add(1l);
-            
-          }
-          multiDateTestStart.add(list5);
-        } else {
-          if( i != 0 ) intDateTestStart.get(dt-1).add(i); else increment(intDateTestMissing,dt-1);
-          if( l != 0l ) longDateTestStart.get(dt-1).add(l); else increment(longDateTestMissing,dt-1);
-          if( f != 0.0f ) floatDateTestStart.get(dt-1).add(f); else increment(floatDateTestMissing,dt-1);
-          if( d != 0.0d ) doubleDateTestStart.get(dt-1).add(d); else increment(doubleDateTestMissing,dt-1);
-          if( i != 0 ) multiDateTestStart.get(dt-1).add(i); else increment(multiDateTestMissing,dt-1);
-        }
-      }
-      
-      if ( dtm != 0 ) {
-        if ( j-DATEM < 0 && dtm != dt ) {
-          ArrayList<Integer> list1 = new ArrayList<>();
-          if( i != 0 ) {
-            list1.add(i);
-            multiDateTestMissing.add(0l);
-          } else {
-            multiDateTestMissing.add(1l);
-          }
-          multiDateTestStart.add(list1);
-        } else if ( dtm != dt || multiCanHaveDuplicates ) {
-          if( i != 0 ) multiDateTestStart.get(dtm-1).add(i); else increment(multiDateTestMissing,dtm-1);
-        }
-      }
-      
-      if( s != 0 ){
-        //Strings
-        if ( j-STRING < 0 ) {
-          ArrayList<Integer> list1 = new ArrayList<>();
-          if( i != 0 ) {
-            list1.add(i);
-            intStringTestMissing.add(0l);
-          } else {
-            intStringTestMissing.add(1l);
-          }
-          intStringTestStart.add(list1);
-          ArrayList<Long> list2 = new ArrayList<>();
-          if( l != 0l ) {
-            list2.add(l);
-            longStringTestMissing.add(0l);
-          } else {
-            longStringTestMissing.add(1l);
-          }
-          longStringTestStart.add(list2);
-          ArrayList<Float> list3 = new ArrayList<>();
-          if( f != 0.0f ){
-            list3.add(f);
-            floatStringTestMissing.add(0l);
-          } else {
-            floatStringTestMissing.add(1l);
-          }
-          floatStringTestStart.add(list3);
-          ArrayList<Double> list4 = new ArrayList<>();
-          if( d != 0.0d ) {
-            list4.add(d);
-            doubleStringTestMissing.add(0l);
-          } else {
-            doubleStringTestMissing.add(1l);
-          }
-          doubleStringTestStart.add(list4);
-          ArrayList<Integer> list5 = new ArrayList<>();
-          if( i != 0 ) {
-            list5.add(i);
-            multiStringTestMissing.add(0l);
-          } else {
-            multiStringTestMissing.add(1l);
-          }
-          multiStringTestStart.add(list5);
-        } else {
-          if( i != 0 ) intStringTestStart.get(s-1).add(i); else increment(intStringTestMissing,s-1);
-          if( l != 0l ) longStringTestStart.get(s-1).add(l); else increment(longStringTestMissing,s-1);
-          if( f != 0.0f ) floatStringTestStart.get(s-1).add(f); else increment(floatStringTestMissing,s-1);
-          if( d != 0.0d ) doubleStringTestStart.get(s-1).add(d); else increment(doubleStringTestMissing,s-1);
-          if( i != 0 ) multiStringTestStart.get(s-1).add(i); else increment(multiStringTestMissing,s-1);
-        }
-      }
-      
-      //Strings
-      if( sm != 0 ){
-        if ( j-STRINGM < 0 && sm != s ) {
-          ArrayList<Integer> list1 = new ArrayList<>();
-          if( i != 0 ){
-            list1.add(i);
-            multiStringTestMissing.add(0l);
-          } else {
-            multiStringTestMissing.add(1l);
-          }
-          multiStringTestStart.add(list1);
-        } else if ( sm != s ) {
-          if( i != 0 ) multiStringTestStart.get(sm-1).add(i); else increment(multiStringTestMissing,sm-1);
-        }
-      }
-      
-      //Int
-      if( i != 0 ) {
-        if ( j-INT < 0 ) {
-          ArrayList<String> list1 = new ArrayList<>();
-          if( dt != 0 ){
-            list1.add((1800+dt) + "-12-31T23:59:59Z");
-            dateIntTestMissing.add(0l);
-          } else {
-            dateIntTestMissing.add(1l);
-          }
-          dateIntTestStart.add(list1);
-          ArrayList<String> list2 = new ArrayList<>();
-          if( s != 0 ) {
-            list2.add("str"+s);
-            stringIntTestMissing.add(0l);
-          } else {
-            stringIntTestMissing.add(1l);
-          }
-          stringIntTestStart.add(list2);
-        } else {
-          if( dt != 0 ) dateIntTestStart.get(i-1).add((1800+dt) + "-12-31T23:59:59Z"); else increment(dateIntTestMissing,i-1);
-          if( s != 0 ) stringIntTestStart.get(i-1).add("str"+s); else increment(stringIntTestMissing,i-1);
-        }
-      }
-      
-      //Long
-      if( l != 0 ) {
-        if ( j-LONG < 0 ) {
-          ArrayList<String> list1 = new ArrayList<>();
-          if( dt != 0 ){
-            list1.add((1800+dt) + "-12-31T23:59:59Z");
-            dateLongTestMissing.add(0l);
-          } else {
-            dateLongTestMissing.add(1l);
-          }
-          dateLongTestStart.add(list1);
-          ArrayList<String> list2 = new ArrayList<>();
-          if( s != 0 ) {
-            list2.add("str"+s);
-            stringLongTestMissing.add(0l);
-          } else {
-            stringLongTestMissing.add(1l);
-          }
-          stringLongTestStart.add(list2);
-          ArrayList<Integer> list3 = new ArrayList<>();
-          if( i != 0 ) {
-            list3.add(i);
-            multiLongTestMissing.add(0l);
-          } else {
-            multiLongTestMissing.add(1l);
-          }
-          multiLongTestStart.add(list3);
-        } else {
-          if( dt != 0 ) dateLongTestStart.get((int)l-1).add((1800+dt) + "-12-31T23:59:59Z"); else increment(dateLongTestMissing,(int)l-1);
-          if( s != 0 ) stringLongTestStart.get((int)l-1).add("str"+s); else increment(stringLongTestMissing,(int)l-1);
-          if( i != 0 ) multiLongTestStart.get((int)l-1).add(i); else increment(multiLongTestMissing,(int)l-1);
-        }
-      }
-      
-      //Long
-      if( lm != 0 ) {
-        if ( j-LONGM < 0 && lm != l ) {
-          ArrayList<Integer> list1 = new ArrayList<>();
-          if( i != 0 ) {
-            list1.add(i);
-            multiLongTestMissing.add(0l);
-          } else {
-            multiLongTestMissing.add(1l);
-          }
-          multiLongTestStart.add(list1);
-        } else if ( lm != l || multiCanHaveDuplicates ) {
-          if( i != 0 ) multiLongTestStart.get((int)lm-1).add(i); else increment( multiLongTestMissing,(int)lm-1);
-        }
-      }
-      
-    }
-
-    req.commit(cluster.getSolrClient(), COLLECTIONORALIAS);
-    
-  }
-  
-  @SuppressWarnings("unchecked")
-  @Test
-  public void sumTest() throws Exception { 
-    String[] params = new String[] {
-        "o.sum.s.int", "sum(int_id)",
-        "o.sum.s.long", "sum(long_ld)",
-        "o.sum.s.float", "sum(float_fd)",
-        "o.sum.s.double", "sum(double_dd)",
-        "o.sum.ff", "string_sd",
-        "o.sum.ff", "date_dtd"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-
-    //Int Date
-    Collection<Double> intDate = getValueList(response, "sum", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Double> intDateTest = calculateNumberStat(intDateTestStart, "sum");
-    assertEquals(responseStr.toString(),intDate,intDateTest);
-    //Int String
-    Collection<Double> intString = getValueList(response, "sum", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Double> intStringTest = calculateNumberStat(intStringTestStart, "sum");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Double> longDate = getValueList(response, "sum", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Double> longDateTest = calculateNumberStat(longDateTestStart, "sum");
-    assertEquals(responseStr,longDate,longDateTest);
-    //Long String
-    Collection<Double> longString = getValueList(response, "sum", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Double> longStringTest = calculateNumberStat(longStringTestStart, "sum");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Double> floatDate = getValueList(response, "sum", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Double> floatDateTest = calculateNumberStat(floatDateTestStart, "sum");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    //Float String
-    Collection<Double> floatString = getValueList(response, "sum", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Double> floatStringTest = calculateNumberStat(floatStringTestStart, "sum");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Double> doubleDate = getValueList(response, "sum", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Double> doubleDateTest = calculateNumberStat(doubleDateTestStart, "sum");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    //Double String
-    Collection<Double> doubleString = getValueList(response, "sum", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Double> doubleStringTest = calculateNumberStat(doubleStringTestStart, "sum");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test
-  public void meanTest() throws Exception { 
-    String[] params = new String[] {
-        "o.mean.s.int", "mean(int_id)",
-        "o.mean.s.long", "mean(long_ld)",
-        "o.mean.s.float", "mean(float_fd)",
-        "o.mean.s.double", "mean(double_dd)",
-        "o.mean.ff", "string_sd",
-        "o.mean.ff", "date_dtd"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Double> intDate = getValueList(response, "mean", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Double> intDateTest = calculateNumberStat(intDateTestStart, "mean");
-    assertEquals(responseStr,intDate,intDateTest);
-    //Int String
-    Collection<Double> intString = getValueList(response, "mean", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Double> intStringTest = calculateNumberStat(intStringTestStart, "mean");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Double> longDate = getValueList(response, "mean", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Double> longDateTest = calculateNumberStat(longDateTestStart, "mean");
-    assertEquals(responseStr,longDate,longDateTest);
-    //Long String
-    Collection<Double> longString = getValueList(response, "mean", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Double> longStringTest = calculateNumberStat(longStringTestStart, "mean");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Double> floatDate = getValueList(response, "mean", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Double> floatDateTest = calculateNumberStat(floatDateTestStart, "mean");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    //Float String
-    Collection<Double> floatString = getValueList(response, "mean", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Double> floatStringTest = calculateNumberStat(floatStringTestStart, "mean");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Double> doubleDate = getValueList(response, "mean", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Double> doubleDateTest = calculateNumberStat(doubleDateTestStart, "mean");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    //Double String
-    Collection<Double> doubleString = getValueList(response, "mean", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Double> doubleStringTest = calculateNumberStat(doubleStringTestStart, "mean");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-  }
-  
-  @SuppressWarnings("unchecked")
-  @Test
-  public void stddevFacetAscTest() throws Exception { 
-    String[] params = new String[] {
-        "o.stddev.s.int", "stddev(int_id)",
-        "o.stddev.s.long", "stddev(long_ld)",
-        "o.stddev.s.float", "stddev(float_fd)",
-        "o.stddev.s.double", "stddev(double_dd)",
-        "o.stddev.ff", "string_sd",
-        "o.stddev.ff", "date_dtd"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    
-    //Int Date
-    ArrayList<Double> intDate = getValueList(response, "stddev", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Double> intDateTest = calculateNumberStat(intDateTestStart, "stddev");
-    checkStddevs(response, intDate, intDateTest);
-    //Int String
-    ArrayList<Double> intString = getValueList(response, "stddev", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Double> intStringTest = calculateNumberStat(intStringTestStart, "stddev");
-    checkStddevs(response, intString, intStringTest);
-
-    //Long Date
-    ArrayList<Double> longDate = getValueList(response, "stddev", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Double> longDateTest = calculateNumberStat(longDateTestStart, "stddev");
-    checkStddevs(response, longDate, longDateTest);
-    //Long String
-    ArrayList<Double> longString = getValueList(response, "stddev", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Double> longStringTest = calculateNumberStat(longStringTestStart, "stddev");
-    checkStddevs(response, longString, longStringTest);
-
-    //Float Date
-    ArrayList<Double> floatDate = getValueList(response, "stddev", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Double> floatDateTest = calculateNumberStat(floatDateTestStart, "stddev");
-    checkStddevs(response, floatDate, floatDateTest);
-    //Float String
-    ArrayList<Double> floatString = getValueList(response, "stddev", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Double> floatStringTest = calculateNumberStat(floatStringTestStart, "stddev");
-    checkStddevs(response, floatString, floatStringTest);
-
-    //Double Date
-    ArrayList<Double> doubleDate = getValueList(response, "stddev", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Double> doubleDateTest = calculateNumberStat(doubleDateTestStart, "stddev");
-    checkStddevs(response, doubleDate, doubleDateTest);
-    //Double String
-    ArrayList<Double> doubleString = getValueList(response, "stddev", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Double> doubleStringTest = calculateNumberStat(doubleStringTestStart, "stddev");
-    checkStddevs(response, doubleString, doubleStringTest);
-  }
-  
-  @SuppressWarnings("unchecked")
-  @Test
-  public void medianFacetAscTest() throws Exception { 
-    String[] params = new String[] {
-        "o.median.s.int", "median(int_id)",
-        "o.median.s.long", "median(long_ld)",
-        "o.median.s.float", "median(float_fd)",
-        "o.median.s.double", "median(double_dd)",
-        "o.median.ff", "string_sd",
-        "o.median.ff", "date_dtd"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Double> intDate = getValueList(response, "median","fieldFacets", "date_dtd", "int", false);
-    ArrayList<Double> intDateTest = calculateNumberStat(intDateTestStart, "median");
-    assertEquals(responseStr,intDate,intDateTest);
-    //Int String
-    Collection<Double> intString = getValueList(response, "median", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Double> intStringTest = calculateNumberStat(intStringTestStart, "median");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Double> longDate = getValueList(response, "median", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Double> longDateTest = calculateNumberStat(longDateTestStart, "median");
-    assertEquals(responseStr,longDate,longDateTest);
-    //Long String
-    Collection<Double> longString = getValueList(response, "median", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Double> longStringTest = calculateNumberStat(longStringTestStart, "median");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Double> floatDate = getValueList(response, "median", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Double> floatDateTest = calculateNumberStat(floatDateTestStart, "median");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    //Float String
-    Collection<Double> floatString = getValueList(response, "median", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Double> floatStringTest = calculateNumberStat(floatStringTestStart, "median");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Double> doubleDate = getValueList(response, "median", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Double> doubleDateTest = calculateNumberStat(doubleDateTestStart, "median");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    //Double String
-    Collection<Double> doubleString = getValueList(response, "median", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Double> doubleStringTest = calculateNumberStat(doubleStringTestStart, "median");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test
-  public void perc20Test() throws Exception { 
-    String[] params = new String[] {
-        "o.percentile_20n.s.int", "percentile(20,int_id)",
-        "o.percentile_20n.s.long", "percentile(20,long_ld)",
-        "o.percentile_20n.s.float", "percentile(20,float_fd)",
-        "o.percentile_20n.s.double", "percentile(20,double_dd)",
-        "o.percentile_20n.ff", "string_sd",
-        "o.percentile_20n.ff", "date_dtd",
-
-        "o.percentile_20.s.str", "percentile(20,string_sd)",
-        "o.percentile_20.s.date", "string(percentile(20,date_dtd))",
-        "o.percentile_20.ff", "int_id",
-        "o.percentile_20.ff", "long_ld"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Integer> intDate = getValueList(response, "percentile_20n", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Integer> intDateTest = (ArrayList<Integer>)calculateStat(intDateTestStart, "perc_20");
-    assertEquals(responseStr,intDate,intDateTest);
-    //Int String
-    Collection<Integer> intString = getValueList(response, "percentile_20n", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Integer> intStringTest = (ArrayList<Integer>)calculateStat(intStringTestStart, "perc_20");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Long> longDate = getValueList(response, "percentile_20n", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Long> longDateTest = (ArrayList<Long>)calculateStat(longDateTestStart, "perc_20");
-    assertEquals(responseStr,longDate,longDateTest);
-    //Long String
-    Collection<Long> longString = getValueList(response, "percentile_20n", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Long> longStringTest = (ArrayList<Long>)calculateStat(longStringTestStart, "perc_20");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Float> floatDate = getValueList(response, "percentile_20n", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Float> floatDateTest = (ArrayList<Float>)calculateStat(floatDateTestStart, "perc_20");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    //Float String
-    Collection<Float> floatString = getValueList(response, "percentile_20n", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Float> floatStringTest = (ArrayList<Float>)calculateStat(floatStringTestStart, "perc_20");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Double> doubleDate = getValueList(response, "percentile_20n", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Double> doubleDateTest = (ArrayList<Double>)calculateStat(doubleDateTestStart, "perc_20");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    //Double String
-    Collection<Double> doubleString = getValueList(response, "percentile_20n", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Double> doubleStringTest = (ArrayList<Double>)calculateStat(doubleStringTestStart, "perc_20");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-
-    //Date Int
-    Collection<String> dateInt = getValueList(response, "percentile_20", "fieldFacets", "int_id", "date", false);
-    ArrayList<String> dateIntTest = (ArrayList<String>)calculateStat(dateIntTestStart, "perc_20");
-    assertEquals(responseStr,dateInt,dateIntTest);
-    //Date Long
-    Collection<String> dateString = getValueList(response, "percentile_20", "fieldFacets", "long_ld", "date", false);
-    ArrayList<String> dateLongTest = (ArrayList<String>)calculateStat(dateLongTestStart, "perc_20");
-    assertEquals(responseStr,dateString,dateLongTest);
-
-    //String Int
-    Collection<String> stringInt = getValueList(response, "percentile_20", "fieldFacets", "int_id", "str", false);
-    ArrayList<String> stringIntTest = (ArrayList<String>)calculateStat(stringIntTestStart, "perc_20");
-    assertEquals(responseStr,stringInt,stringIntTest);
-    //String Long
-    Collection<String> stringLong = getValueList(response, "percentile_20", "fieldFacets", "long_ld", "str", false);
-    ArrayList<String> stringLongTest = (ArrayList<String>)calculateStat(stringLongTestStart, "perc_20");
-    assertEquals(responseStr,stringLong,stringLongTest);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test
-  public void perc60Test() throws Exception { 
-    String[] params = new String[] {
-        "o.percentile_60n.s.int", "percentile(60,int_id)",
-        "o.percentile_60n.s.long", "percentile(60,long_ld)",
-        "o.percentile_60n.s.float", "percentile(60,float_fd)",
-        "o.percentile_60n.s.double", "percentile(60,double_dd)",
-        "o.percentile_60n.ff", "string_sd",
-        "o.percentile_60n.ff", "date_dtd",
-
-        "o.percentile_60.s.str", "percentile(60,string_sd)",
-        "o.percentile_60.s.date", "string(percentile(60,date_dtd))",
-        "o.percentile_60.ff", "int_id",
-        "o.percentile_60.ff", "long_ld"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Integer> intDate = getValueList(response, "percentile_60n", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Integer> intDateTest = (ArrayList<Integer>)calculateStat(intDateTestStart, "perc_60");
-    assertEquals(responseStr,intDate,intDateTest);
-    //Int String
-    Collection<Integer> intString = getValueList(response, "percentile_60n", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Integer> intStringTest = (ArrayList<Integer>)calculateStat(intStringTestStart, "perc_60");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Long> longDate = getValueList(response, "percentile_60n", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Long> longDateTest = (ArrayList<Long>)calculateStat(longDateTestStart, "perc_60");
-    assertEquals(responseStr,longDate,longDateTest);
-    //Long String
-    Collection<Long> longString = getValueList(response, "percentile_60n", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Long> longStringTest = (ArrayList<Long>)calculateStat(longStringTestStart, "perc_60");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Float> floatDate = getValueList(response, "percentile_60n", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Float> floatDateTest = (ArrayList<Float>)calculateStat(floatDateTestStart, "perc_60");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    //Float String
-    Collection<Float> floatString = getValueList(response, "percentile_60n", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Float> floatStringTest = (ArrayList<Float>)calculateStat(floatStringTestStart, "perc_60");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Double> doubleDate = getValueList(response, "percentile_60n", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Double> doubleDateTest = (ArrayList<Double>)calculateStat(doubleDateTestStart, "perc_60");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    //Double String
-    Collection<Double> doubleString = getValueList(response, "percentile_60n", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Double> doubleStringTest = (ArrayList<Double>)calculateStat(doubleStringTestStart, "perc_60");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-
-    //Date Int
-    Collection<String> dateInt = getValueList(response, "percentile_60", "fieldFacets", "int_id", "date", false);
-    ArrayList<String> dateIntTest = (ArrayList<String>)calculateStat(dateIntTestStart, "perc_60");
-    assertEquals(responseStr,dateInt,dateIntTest);
-    //Date Long
-    Collection<String> dateString = getValueList(response, "percentile_60", "fieldFacets", "long_ld", "date", false);
-    ArrayList<String> dateLongTest = (ArrayList<String>)calculateStat(dateLongTestStart, "perc_60");
-    assertEquals(responseStr,dateString,dateLongTest);
-
-    //String Int
-    Collection<String> stringInt = getValueList(response, "percentile_60", "fieldFacets", "int_id", "str", false);
-    ArrayList<String> stringIntTest = (ArrayList<String>)calculateStat(stringIntTestStart, "perc_60");
-    assertEquals(responseStr,stringInt,stringIntTest);
-    //String Long
-    Collection<String> stringLong = getValueList(response, "percentile_60", "fieldFacets", "long_ld", "str", false);
-    ArrayList<String> stringLongTest = (ArrayList<String>)calculateStat(stringLongTestStart, "perc_60");
-    assertEquals(responseStr,stringLong,stringLongTest);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test
-  public void minTest() throws Exception { 
-    String[] params = new String[] {
-        "o.minn.s.int", "min(int_id)",
-        "o.minn.s.long", "min(long_ld)",
-        "o.minn.s.float", "min(float_fd)",
-        "o.minn.s.double", "min(double_dd)",
-        "o.minn.ff", "string_sd",
-        "o.minn.ff", "date_dtd",
-
-        "o.min.s.str", "min(string_sd)",
-        "o.min.s.date", "string(min(date_dtd))",
-        "o.min.ff", "int_id",
-        "o.min.ff", "long_ld"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Integer> intDate = getValueList(response, "minn", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Integer> intDateTest = (ArrayList<Integer>)calculateStat(intDateTestStart, "min");
-    assertEquals(responseStr,intDate,intDateTest);
-    //Int String
-    Collection<Integer> intString = getValueList(response, "minn", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Integer> intStringTest = (ArrayList<Integer>)calculateStat(intStringTestStart, "min");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Long> longDate = getValueList(response, "minn", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Long> longDateTest = (ArrayList<Long>)calculateStat(longDateTestStart, "min");
-    assertEquals(responseStr,longDate,longDateTest);
-    //Long String
-    Collection<Long> longString = getValueList(response, "minn", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Long> longStringTest = (ArrayList<Long>)calculateStat(longStringTestStart, "min");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Float> floatDate = getValueList(response, "minn", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Float> floatDateTest = (ArrayList<Float>)calculateStat(floatDateTestStart, "min");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    //Float String
-    Collection<Float> floatString = getValueList(response, "minn", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Float> floatStringTest = (ArrayList<Float>)calculateStat(floatStringTestStart, "min");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Double> doubleDate = getValueList(response, "minn", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Double> doubleDateTest = (ArrayList<Double>)calculateStat(doubleDateTestStart, "min");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    //Double String
-    Collection<Double> doubleString = getValueList(response, "minn", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Double> doubleStringTest = (ArrayList<Double>)calculateStat(doubleStringTestStart, "min");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-
-    //Date Int
-    Collection<String> dateInt = getValueList(response, "min", "fieldFacets", "int_id", "date", false);
-    ArrayList<String> dateIntTest = (ArrayList<String>)calculateStat(dateIntTestStart, "min");
-    assertEquals(responseStr,dateInt,dateIntTest);
-    //Date Long
-    Collection<String> dateString = getValueList(response, "min", "fieldFacets", "long_ld", "date", false);
-    ArrayList<String> dateLongTest = (ArrayList<String>)calculateStat(dateLongTestStart, "min");
-    assertEquals(responseStr,dateString,dateLongTest);
-
-    //String Int
-    Collection<String> stringInt = getValueList(response, "min", "fieldFacets", "int_id", "str", false);
-    ArrayList<String> stringIntTest = (ArrayList<String>)calculateStat(stringIntTestStart, "min");
-    assertEquals(responseStr,stringInt,stringIntTest);
-    //String Long
-    Collection<String> stringLong = getValueList(response, "min", "fieldFacets", "long_ld", "str", false);
-    ArrayList<String> stringLongTest = (ArrayList<String>)calculateStat(stringLongTestStart, "min");
-    assertEquals(responseStr,stringLong,stringLongTest);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test
-  public void maxTest() throws Exception { 
-    String[] params = new String[] {
-        "o.maxn.s.int", "max(int_id)",
-        "o.maxn.s.long", "max(long_ld)",
-        "o.maxn.s.float", "max(float_fd)",
-        "o.maxn.s.double", "max(double_dd)",
-        "o.maxn.ff", "string_sd",
-        "o.maxn.ff", "date_dtd",
-
-        "o.max.s.str", "max(string_sd)",
-        "o.max.s.date", "string(max(date_dtd))",
-        "o.max.ff", "int_id",
-        "o.max.ff", "long_ld"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Integer> intDate = getValueList(response, "maxn", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Integer> intDateTest = (ArrayList<Integer>)calculateStat(intDateTestStart, "max");
-    assertEquals(responseStr,intDate,intDateTest);
-    
-    //Int String
-    Collection<Integer> intString = getValueList(response, "maxn", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Integer> intStringTest = (ArrayList<Integer>)calculateStat(intStringTestStart, "max");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Long> longDate = getValueList(response, "maxn", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Long> longDateTest = (ArrayList<Long>)calculateStat(longDateTestStart, "max");
-    assertEquals(responseStr,longDate,longDateTest);
-    
-    //Long String
-    Collection<Long> longString = getValueList(response, "maxn", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Long> longStringTest = (ArrayList<Long>)calculateStat(longStringTestStart, "max");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Float> floatDate = getValueList(response, "maxn", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Float> floatDateTest = (ArrayList<Float>)calculateStat(floatDateTestStart, "max");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    
-    //Float String
-    Collection<Float> floatString = getValueList(response, "maxn", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Float> floatStringTest = (ArrayList<Float>)calculateStat(floatStringTestStart, "max");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Double> doubleDate = getValueList(response, "maxn", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Double> doubleDateTest = (ArrayList<Double>)calculateStat(doubleDateTestStart, "max");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    
-    //Double String
-    Collection<Double> doubleString = getValueList(response, "maxn", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Double> doubleStringTest = (ArrayList<Double>)calculateStat(doubleStringTestStart, "max");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-    
-    //String Int
-    Collection<String> stringInt = getValueList(response, "max", "fieldFacets", "int_id", "str", false);
-    ArrayList<String> stringIntTest = (ArrayList<String>)calculateStat(stringIntTestStart, "max");
-    assertEquals(responseStr,stringInt,stringIntTest);
-    
-    //String Long
-    Collection<String> stringLong = getValueList(response, "max", "fieldFacets", "long_ld", "str", false);
-    ArrayList<String> stringLongTest = (ArrayList<String>)calculateStat(stringLongTestStart, "max");
-    assertEquals(responseStr,stringLong,stringLongTest);
-
-    //Date Int
-    Collection<String> dateInt = getValueList(response, "max", "fieldFacets", "int_id", "date", false);
-    ArrayList<String> dateIntTest = (ArrayList<String>)calculateStat(dateIntTestStart, "max");
-    assertEquals(responseStr,dateInt,dateIntTest);
-    
-    //Date Long
-    Collection<String> dateString = getValueList(response, "max", "fieldFacets", "long_ld", "date", false);
-    ArrayList<String> dateLongTest = (ArrayList<String>)calculateStat(dateLongTestStart, "max");
-    assertEquals(responseStr,dateString,dateLongTest);
-
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test
-  public void uniqueTest() throws Exception { 
-    String[] params = new String[] {
-        "o.uniquen.s.int", "unique(int_id)",
-        "o.uniquen.s.long", "unique(long_ld)",
-        "o.uniquen.s.float", "unique(float_fd)",
-        "o.uniquen.s.double", "unique(double_dd)",
-        "o.uniquen.ff", "string_sd",
-        "o.uniquen.ff", "date_dtd",
-
-        "o.unique.s.str", "unique(string_sd)",
-        "o.unique.s.date", "unique(date_dtd)",
-        "o.unique.ff", "int_id",
-        "o.unique.ff", "long_ld"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Long> intDate = getValueList(response, "uniquen", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Long> intDateTest = (ArrayList<Long>)calculateStat(intDateTestStart, "unique");
-    assertEquals(responseStr,intDate,intDateTest);
-    //Int String
-    Collection<Long> intString = getValueList(response, "uniquen", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Long> intStringTest = (ArrayList<Long>)calculateStat(intStringTestStart, "unique");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Long> longDate = getValueList(response, "uniquen", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Long> longDateTest = (ArrayList<Long>)calculateStat(longDateTestStart, "unique");
-    assertEquals(responseStr,longDate,longDateTest);
-    //Long String
-    Collection<Long> longString = getValueList(response, "uniquen", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Long> longStringTest = (ArrayList<Long>)calculateStat(longStringTestStart, "unique");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Long> floatDate = getValueList(response, "uniquen", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Long> floatDateTest = (ArrayList<Long>)calculateStat(floatDateTestStart, "unique");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    //Float String
-    Collection<Long> floatString = getValueList(response, "uniquen", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Long> floatStringTest = (ArrayList<Long>)calculateStat(floatStringTestStart, "unique");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Long> doubleDate = getValueList(response, "uniquen", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Long> doubleDateTest = (ArrayList<Long>)calculateStat(doubleDateTestStart, "unique");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    //Double String
-    Collection<Long> doubleString = getValueList(response, "uniquen", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Long> doubleStringTest = (ArrayList<Long>)calculateStat(doubleStringTestStart, "unique");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-
-    //Date Int
-    Collection<Long> dateInt = getValueList(response, "unique", "fieldFacets", "int_id", "date", false);
-    ArrayList<Long> dateIntTest = (ArrayList<Long>)calculateStat(dateIntTestStart, "unique");
-    assertEquals(responseStr,dateInt,dateIntTest);
-    //Date Long
-    Collection<Long> dateString = getValueList(response, "unique", "fieldFacets", "long_ld", "date", false);
-    ArrayList<Long> dateLongTest = (ArrayList<Long>)calculateStat(dateLongTestStart, "unique");
-    assertEquals(responseStr,dateString,dateLongTest);
-
-    //String Int
-    Collection<Long> stringInt = getValueList(response, "unique", "fieldFacets", "int_id", "str", false);
-    ArrayList<Long> stringIntTest = (ArrayList<Long>)calculateStat(stringIntTestStart, "unique");
-    assertEquals(responseStr,stringInt,stringIntTest);
-    //String Long
-    Collection<Long> stringLong = getValueList(response, "unique", "fieldFacets", "long_ld", "str", false);
-    ArrayList<Long> stringLongTest = (ArrayList<Long>)calculateStat(stringLongTestStart, "unique");
-    assertEquals(responseStr,stringLong,stringLongTest);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test
-  public void countTest() throws Exception { 
-    String[] params = new String[] {
-        "o.countn.s.int", "count(int_id)",
-        "o.countn.s.long", "count(long_ld)",
-        "o.countn.s.float", "count(float_fd)",
-        "o.countn.s.double", "count(double_dd)",
-        "o.countn.ff", "string_sd",
-        "o.countn.ff", "date_dtd",
-
-        "o.count.s.str", "count(string_sd)",
-        "o.count.s.date", "count(date_dtd)",
-        "o.count.ff", "int_id",
-        "o.count.ff", "long_ld"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Long> intDate = getValueList(response, "countn", "fieldFacets", "date_dtd", "int", false);
-    ArrayList<Long> intDateTest = (ArrayList<Long>)calculateStat(intDateTestStart, "count");
-    assertEquals(responseStr,intDate,intDateTest);
-    
-    //Int String
-    Collection<Long> intString = getValueList(response, "countn", "fieldFacets", "string_sd", "int", false);
-    ArrayList<Long> intStringTest = (ArrayList<Long>)calculateStat(intStringTestStart, "count");
-    assertEquals(responseStr,intString,intStringTest);
-
-    //Long Date
-    Collection<Long> longDate = getValueList(response, "countn", "fieldFacets", "date_dtd", "long", false);
-    ArrayList<Long> longDateTest = (ArrayList<Long>)calculateStat(longDateTestStart, "count");
-    assertEquals(responseStr,longDate,longDateTest);
-    
-    //Long String
-    Collection<Long> longString = getValueList(response, "countn", "fieldFacets", "string_sd", "long", false);
-    ArrayList<Long> longStringTest = (ArrayList<Long>)calculateStat(longStringTestStart, "count");
-    assertEquals(responseStr,longString,longStringTest);
-
-    //Float Date
-    Collection<Long> floatDate = getValueList(response, "countn", "fieldFacets", "date_dtd", "float", false);
-    ArrayList<Long> floatDateTest = (ArrayList<Long>)calculateStat(floatDateTestStart, "count");
-    assertEquals(responseStr,floatDate,floatDateTest);
-    
-    //Float String
-    Collection<Long> floatString = getValueList(response, "countn", "fieldFacets", "string_sd", "float", false);
-    ArrayList<Long> floatStringTest = (ArrayList<Long>)calculateStat(floatStringTestStart, "count");
-    assertEquals(responseStr,floatString,floatStringTest);
-
-    //Double Date
-    Collection<Long> doubleDate = getValueList(response, "countn", "fieldFacets", "date_dtd", "double", false);
-    ArrayList<Long> doubleDateTest = (ArrayList<Long>)calculateStat(doubleDateTestStart, "count");
-    assertEquals(responseStr,doubleDate,doubleDateTest);
-    
-    //Double String
-    Collection<Long> doubleString = getValueList(response, "countn", "fieldFacets", "string_sd", "double", false);
-    ArrayList<Long> doubleStringTest = (ArrayList<Long>)calculateStat(doubleStringTestStart, "count");
-    assertEquals(responseStr,doubleString,doubleStringTest);
-
-    //Date Int
-    Collection<Long> dateInt = getValueList(response, "count", "fieldFacets", "int_id", "date", false);
-    ArrayList<Long> dateIntTest = (ArrayList<Long>)calculateStat(dateIntTestStart, "count");
-    assertEquals(responseStr,dateIntTest,dateInt);
-    
-    //Date Long
-    Collection<Long> dateLong = getValueList(response, "count", "fieldFacets", "long_ld", "date", false);
-    ArrayList<Long> dateLongTest = (ArrayList<Long>)calculateStat(dateLongTestStart, "count");
-    assertEquals(responseStr,dateLong,dateLongTest);
-
-    //String Int
-    Collection<Long> stringInt = getValueList(response, "count", "fieldFacets", "int_id", "str", false);
-    ArrayList<Long> stringIntTest = (ArrayList<Long>)calculateStat(stringIntTestStart, "count");
-    assertEquals(responseStr,stringInt,stringIntTest);
-    
-    //String Long
-    Collection<Long> stringLong = getValueList(response, "count", "fieldFacets", "long_ld", "str", false);
-    ArrayList<Long> stringLongTest = (ArrayList<Long>)calculateStat(stringLongTestStart, "count");
-    assertEquals(responseStr,stringLong,stringLongTest);
-  }
-
-  @Test
-  public void missingTest() throws Exception { 
-    String[] params = new String[] {
-        "o.missingn.s.int", "missing(int_id)",
-        "o.missingn.s.long", "missing(long_ld)",
-        "o.missingn.s.float", "missing(float_fd)",
-        "o.missingn.s.double", "missing(double_dd)",
-        "o.missingn.ff", "string_sd",
-        "o.missingn.ff", "date_dtd",
-
-        "o.missing.s.str", "missing(string_sd)",
-        "o.missing.s.date", "missing(date_dtd)",
-        "o.missing.ff", "int_id",
-        "o.missing.ff", "long_ld"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Int Date
-    Collection<Long> intDate = getValueList(response, "missingn", "fieldFacets", "date_dtd", "int", false);
-    setLatestType("int");
-    assertEquals(responseStr,intDateTestMissing,intDate);
-    
-    //Int String
-    Collection<Long> intString = getValueList(response, "missingn", "fieldFacets", "string_sd", "int", false);
-    assertEquals(responseStr,intStringTestMissing,intString);
-
-    //Long Date
-    Collection<Long> longDate = getValueList(response, "missingn", "fieldFacets", "date_dtd", "long", false);
-    setLatestType("long");
-    assertEquals(responseStr,longDateTestMissing,longDate);
-    
-    //Long String
-    Collection<Long> longString = getValueList(response, "missingn", "fieldFacets", "string_sd", "long", false);
-    assertEquals(responseStr,longStringTestMissing,longString);
-
-    //Float Date
-    Collection<Long> floatDate = getValueList(response, "missingn", "fieldFacets", "date_dtd", "float", false);
-    setLatestType("float");
-    assertEquals(responseStr,floatDateTestMissing,floatDate);
-    
-    //Float String
-    Collection<Long> floatString = getValueList(response, "missingn", "fieldFacets", "string_sd", "float", false);
-    assertEquals(responseStr,floatStringTestMissing,floatString);
-
-    //Double Date
-    Collection<Long> doubleDate = getValueList(response, "missingn", "fieldFacets", "date_dtd", "double", false);
-    setLatestType("double");
-    assertEquals(responseStr,doubleDateTestMissing,doubleDate);
-    
-    //Double String
-    Collection<Long> doubleString = getValueList(response, "missingn", "fieldFacets", "string_sd", "double", false);
-    assertEquals(responseStr,doubleStringTestMissing,doubleString);
-
-    //Date Int
-    Collection<Long> dateInt = getValueList(response, "missing", "fieldFacets", "int_id", "date", false);
-    setLatestType("date");
-    assertEquals(responseStr,dateIntTestMissing,dateInt);
-    
-    //Date Long
-    Collection<Long> dateLong = getValueList(response, "missing", "fieldFacets", "long_ld", "date", false);
-    assertEquals(responseStr,dateLongTestMissing,dateLong);
-
-    //String Int
-    Collection<Long> stringInt = getValueList(response, "missing", "fieldFacets", "int_id", "str", false);
-    setLatestType("string");
-    assertEquals(responseStr,stringIntTestMissing,stringInt);
-    
-    //String Long
-    Collection<Long> stringLong = getValueList(response, "missing", "fieldFacets", "long_ld", "str", false);
-    assertEquals(responseStr,stringLongTestMissing,stringLong);
-  }
-  
-  @SuppressWarnings("unchecked")
-  @Test
-  public void multiValueTest() throws Exception { 
-    String[] params = new String[] {
-        "o.multivalued.s.mean", "mean(int_id)",
-        "o.multivalued.ff", "long_ldm",
-        "o.multivalued.ff", "string_sdm",
-        "o.multivalued.ff", "date_dtdm"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //Long
-    Collection<Double> lon = getValueList(response, "multivalued", "fieldFacets", "long_ldm", "mean", false);
-    ArrayList<Double> longTest = calculateNumberStat(multiLongTestStart, "mean");
-    assertEquals(responseStr,lon,longTest);
-    //Date
-    Collection<Double> date = getValueList(response, "multivalued", "fieldFacets", "date_dtdm", "mean", false);
-    ArrayList<Double> dateTest = calculateNumberStat(multiDateTestStart, "mean");
-    assertEquals(responseStr,date,dateTest);
-    //String
-    Collection<Double> string = getValueList(response, "multivalued", "fieldFacets", "string_sdm", "mean", false);
-    ArrayList<Double> stringTest = calculateNumberStat(multiStringTestStart, "mean");
-    assertEquals(responseStr,string,stringTest);
-  }
-  
-  @SuppressWarnings("unchecked")
-  @Test
-  public void missingFacetTest() throws Exception { 
-    String[] params = new String[] {
-        "o.missingf.s.mean", "mean(int_id)",
-        "o.missingf.ff", "date_dtd",
-        "o.missingf.ff", "string_sd",
-        "o.missingf.ff.string_sd.sm", "true",
-        "o.missingf.ff", "date_dtdm",
-        "o.missingf.ff.date_dtdm.sm", "true"
-    };
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    //int MultiDate
-    assertTrue(responseStr, responseContainsFacetValue(response, "missingf", "fieldFacets", "date_dtdm", "(MISSING)"));
-    ArrayList<Double> string = getValueList(response, "missingf", "fieldFacets", "date_dtdm", "mean", false);
-    ArrayList<Double> stringTest = calculateNumberStat(multiDateTestStart, "mean");
-    assertEquals(responseStr, string,stringTest);
-    
-    //Int String
-    assertTrue(responseStr, responseContainsFacetValue(response, "missingf", "fieldFacets", "string_sd", "(MISSING)"));
-    assertTrue(responseStr, !responseContainsFacetValue(response, "missingf", "fieldFacets", "string_sd", "str0"));
-    List<Double> intString = getValueList(response, "missingf", "fieldFacets", "string_sd", "mean", false);
-    ArrayList<Double> intStringTest = calculateNumberStat(intStringTestStart, "mean");
-    assertEquals(responseStr, intString,intStringTest);
-    
-    //Int Date
-    Collection<Double> intDate = getValueList(response, "missingf", "fieldFacets", "date_dtd", "mean", false);
-    ArrayList<ArrayList<Double>> intDateMissingTestStart = (ArrayList<ArrayList<Double>>) intDateTestStart.clone();
-    ArrayList<Double> intDateTest = calculateNumberStat(intDateMissingTestStart, "mean");
-    assertEquals(responseStr,intDate,intDateTest);
-  }
-
-  private void checkStddevs(NamedList<Object> response, ArrayList<Double> list1, ArrayList<Double> list2) {
-    Collections.sort(list1);
-    Collections.sort(list2);
-    for (int i = 0; i<list2.size(); i++) {
-      if ((Math.abs(list1.get(i)-list2.get(i))<.00000000001) == false) {
-        Assert.assertEquals(response.toString(), list1.get(i), list2.get(i), 0.00000000001);
-      }
-    }
-  }
-
-  @SuppressWarnings({"unchecked", "rawtypes"})
-  public static void assertEquals(String mes, Object actual, Object expected) {
-    Collections.sort((List<Comparable>) actual);
-    Collections.sort((List<Comparable>)  expected);
-    Assert.assertEquals(mes, actual, expected);
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a6d1681a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetExtrasCloudTest.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetExtrasCloudTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetExtrasCloudTest.java
deleted file mode 100644
index 427b50d..0000000
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetExtrasCloudTest.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.analytics.facet;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.solr.client.solrj.request.UpdateRequest;
-import org.apache.solr.common.util.NamedList;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class FieldFacetExtrasCloudTest extends AbstractAnalyticsFacetCloudTest {
-  public static final int INT = 21;
-  public static final int LONG = 22;
-  public static final int FLOAT = 23;
-  public static final int DOUBLE = 24;
-  public static final int DATE = 25;
-  public static final int STRING = 26;
-  public static final int NUM_LOOPS = 100;
-  
-  //INT
-  static ArrayList<ArrayList<Integer>> intLongTestStart; 
-  static ArrayList<ArrayList<Integer>> intFloatTestStart; 
-  static ArrayList<ArrayList<Integer>> intDoubleTestStart; 
-  static ArrayList<ArrayList<Integer>> intStringTestStart; 
-  
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    setupCluster();
-
-    //INT
-    intLongTestStart = new ArrayList<>();
-    intFloatTestStart = new ArrayList<>();
-    intDoubleTestStart = new ArrayList<>();
-    intStringTestStart = new ArrayList<>();
-
-    UpdateRequest req = new UpdateRequest();
-    
-    for (int j = 0; j < NUM_LOOPS; ++j) {
-      int i = j%INT;
-      long l = j%LONG;
-      float f = j%FLOAT;
-      double d = j%DOUBLE;
-      int dt = j%DATE;
-      int s = j%STRING;
-      
-      List<String> fields = new ArrayList<>();
-      fields.add("id"); fields.add("1000"+j);
-      fields.add("int_id"); fields.add("" + i);
-      fields.add("long_ld"); fields.add("" + l);
-      fields.add("float_fd"); fields.add("" + f);
-      fields.add("double_dd"); fields.add("" + d);
-      fields.add("date_dtd"); fields.add((1800+dt) + "-12-31T23:59:59.999Z");
-      fields.add("string_sd"); fields.add("abc" + s);
-      req.add(fields.toArray(new String[0]));
-      
-      //Long
-      if (j-LONG<0) {
-        ArrayList<Integer> list1 = new ArrayList<>();
-        list1.add(i);
-        intLongTestStart.add(list1);
-      } else {
-        intLongTestStart.get((int)l).add(i);
-      }
-      //String
-      if (j-FLOAT<0) {
-        ArrayList<Integer> list1 = new ArrayList<>();
-        list1.add(i);
-        intFloatTestStart.add(list1);
-      } else {
-        intFloatTestStart.get((int)f).add(i);
-      }
-      //String
-      if (j-DOUBLE<0) {
-        ArrayList<Integer> list1 = new ArrayList<>();
-        list1.add(i);
-        intDoubleTestStart.add(list1);
-      } else {
-        intDoubleTestStart.get((int)d).add(i);
-      }
-      //String
-      if (j-STRING<0) {
-        ArrayList<Integer> list1 = new ArrayList<>();
-        list1.add(i);
-        intStringTestStart.add(list1);
-      } else {
-        intStringTestStart.get(s).add(i);
-      }
-    }
-
-    req.commit(cluster.getSolrClient(), COLLECTIONORALIAS);
-  }
-  
-  @Test
-  public void limitTest() throws Exception { 
-    String[] params = new String[] {
-        "o.lr.s.mean", "mean(int_id)",
-        "o.lr.s.median", "median(int_id)",
-        "o.lr.s.count", "count(int_id)",
-        "o.lr.s.percentile_20", "percentile(20,int_id)",
-        "o.lr.ff.long_ld", "long_ld",
-        "o.lr.ff.long_ld.ss", "mean",
-        "o.lr.ff.long_ld.sd", "asc",
-        "o.lr.ff.long_ld.limit", "5",
-        "o.lr.ff.float_fd", "float_fd",
-        "o.lr.ff.float_fd.ss", "median",
-        "o.lr.ff.float_fd.sd", "desc",
-        "o.lr.ff.float_fd.limit", "3",
-        "o.lr.ff.double_dd", "double_dd",
-        "o.lr.ff.double_dd.ss", "count",
-        "o.lr.ff.double_dd.sd", "asc",
-        "o.lr.ff.double_dd.limit", "7",
-        "o.lr.ff.string_sd", "string_sd",
-        "o.lr.ff.string_sd.ss", "percentile_20",
-        "o.lr.ff.string_sd.sd", "desc",
-        "o.lr.ff.string_sd.limit", "1"
-    };
-    
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-
-    Collection<Double> lon = getValueList(response, "lr", "fieldFacets", "long_ld", "mean", false);
-    assertEquals(responseStr, lon.size(),5);
-    Collection<Double> flo = getValueList(response, "lr", "fieldFacets", "float_fd", "median", false);
-    assertEquals(responseStr, flo.size(),3);
-    Collection<Long> doub = getValueList(response, "lr", "fieldFacets", "double_dd", "count", false);
-    assertEquals(responseStr, doub.size(),7);
-    Collection<Integer> string = getValueList(response, "lr", "fieldFacets", "string_sd", "percentile_20", false);
-    assertEquals(responseStr, string.size(),1);
-  }
-  
-  @Test
-  public void offsetTest() throws Exception { 
-    String[] params = new String[] {
-        "o.offAll.s.mean", "mean(int_id)",
-        "o.offAll.ff", "long_ld",
-        "o.offAll.ff.long_ld.ss", "mean",
-        "o.offAll.ff.long_ld.sd", "asc",
-        "o.offAll.ff.long_ld.limit", "7",
-
-        "o.off0.s.mean", "mean(int_id)",
-        "o.off0.ff", "long_ld",
-        "o.off0.ff.long_ld.ss", "mean",
-        "o.off0.ff.long_ld.sd", "asc",
-        "o.off0.ff.long_ld.limit", "2",
-        "o.off0.ff.long_ld.offset", "0",
-
-        "o.off1.s.mean", "mean(int_id)",
-        "o.off1.ff", "long_ld",
-        "o.off1.ff.long_ld.ss", "mean",
-        "o.off1.ff.long_ld.sd", "asc",
-        "o.off1.ff.long_ld.limit", "2",
-        "o.off1.ff.long_ld.offset", "2",
-
-        "o.off2.s.mean", "mean(int_id)",
-        "o.off2.ff", "long_ld",
-        "o.off2.ff.long_ld.ss", "mean",
-        "o.off2.ff.long_ld.sd", "asc",
-        "o.off2.ff.long_ld.limit", "3",
-        "o.off2.ff.long_ld.offset", "4"
-    };
-    
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-
-    Collection<Double> lon;
-   
-    List<Double> all = new ArrayList<>();
-    lon = getValueList(response, "off0", "fieldFacets", "long_ld", "mean", false);
-    assertEquals(responseStr, lon.size(),2);
-    assertArrayEquals(new Double[]{ 1.5,  2.0 }, lon.toArray(new Double[0]));
-    all.addAll(lon);
-    
-    lon = getValueList(response, "off1", "fieldFacets", "long_ld", "mean", false);
-    assertEquals(responseStr, lon.size(),2);
-    assertArrayEquals(new Double[]{ 3.0,  4.0 }, lon.toArray(new Double[0]));
-    all.addAll(lon);
-    
-    lon = getValueList(response, "off2", "fieldFacets", "long_ld", "mean", false);
-    assertEquals(responseStr, lon.size(),3);
-    assertArrayEquals(new Double[]{ 5.0,  5.75, 6.0 }, lon.toArray(new Double[0]));
-    all.addAll(lon);
-    
-    lon = getValueList(response, "offAll", "fieldFacets", "long_ld", "mean", false);
-    assertEquals(responseStr, lon.size(),7);
-    assertArrayEquals(all.toArray(new Double[0]), lon.toArray(new Double[0]));
-  }
-  
-  @SuppressWarnings("unchecked")
-  @Test
-  public void sortTest() throws Exception { 
-    String[] params = new String[] {
-        "o.sr.s.mean", "mean(int_id)",
-        "o.sr.s.median", "median(int_id)",
-        "o.sr.s.count", "count(int_id)",
-        "o.sr.s.percentile_20", "percentile(20,int_id)",
-        "o.sr.ff", "long_ld",
-        "o.sr.ff.long_ld.ss", "mean",
-        "o.sr.ff.long_ld.sd", "asc",
-        "o.sr.ff", "float_fd",
-        "o.sr.ff.float_fd.ss", "median",
-        "o.sr.ff.float_fd.sd", "desc",
-        "o.sr.ff", "double_dd",
-        "o.sr.ff.double_dd.ss", "count",
-        "o.sr.ff.double_dd.sd", "asc",
-        "o.sr.ff", "string_sd",
-        "o.sr.ff.string_sd.ss", "percentile_20",
-        "o.sr.ff.string_sd.sd", "desc"
-    };
-    
-    NamedList<Object> response = queryCloudAnalytics(params);
-    String responseStr = response.toString();
-    
-    Collection<Double> lon = getValueList(response, "sr", "fieldFacets", "long_ld", "mean", false);
-    ArrayList<Double> longTest = calculateNumberStat(intLongTestStart, "mean");
-    Collections.sort(longTest);
-    assertEquals(responseStr, longTest,lon);
-    
-    Collection<Double> flo = getValueList(response, "sr", "fieldFacets", "float_fd", "median", false);
-    ArrayList<Double> floatTest = calculateNumberStat(intFloatTestStart, "median");
-    Collections.sort(floatTest,Collections.reverseOrder());
-    assertEquals(responseStr, floatTest,flo);
-    
-    Collection<Long> doub = getValueList(response, "sr", "fieldFacets", "double_dd", "count", false);
-    ArrayList<Long> doubleTest = (ArrayList<Long>)calculateStat(intDoubleTestStart, "count");
-    Collections.sort(doubleTest);
-    assertEquals(responseStr, doubleTest,doub);
-    
-    Collection<Integer> string = getValueList(response, "sr", "fieldFacets", "string_sd", "percentile_20", false);
-    ArrayList<Integer> stringTest = (ArrayList<Integer>)calculateStat(intStringTestStart, "perc_20");
-    Collections.sort(stringTest,Collections.reverseOrder());
-    assertEquals(responseStr, stringTest,string);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a6d1681a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetExtrasTest.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetExtrasTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetExtrasTest.java
deleted file mode 100644
index a7e0012..0000000
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/facet/FieldFacetExtrasTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.analytics.facet;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class FieldFacetExtrasTest extends AbstractAnalyticsFacetTest {
-  static String fileName = "fieldFacetExtras.txt";
-
-  public static final int INT = 21;
-  public static final int LONG = 22;
-  public static final int FLOAT = 23;
-  public static final int DOUBLE = 24;
-  public static final int DATE = 25;
-  public static final int STRING = 26;
-  public static final int NUM_LOOPS = 100;
-  
-  //INT
-  static ArrayList<ArrayList<Integer>> intLongTestStart; 
-  static ArrayList<ArrayList<Integer>> intFloatTestStart; 
-  static ArrayList<ArrayList<Integer>> intDoubleTestStart; 
-  static ArrayList<ArrayList<Integer>> intStringTestStart; 
-  
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    initCore("solrconfig-analytics.xml","schema-analytics.xml");
-    h.update("<delete><query>*:*</query></delete>");
-
-    //INT
-    intLongTestStart = new ArrayList<>();
-    intFloatTestStart = new ArrayList<>();
-    intDoubleTestStart = new ArrayList<>();
-    intStringTestStart = new ArrayList<>();
-
-    for (int j = 0; j < NUM_LOOPS; ++j) {
-      int i = j%INT;
-      long l = j%LONG;
-      float f = j%FLOAT;
-      double d = j%DOUBLE;
-      int dt = j%DATE;
-      int s = j%STRING;
-      assertU(adoc("id", "1000" + j, "int_id", "" + i, "long_ld", "" + l, "float_fd", "" + f, 
-          "double_dd", "" + d,  "date_dtd", (1800+dt) + "-12-31T23:59:59.999Z", "string_sd", "abc" + s));
-      //Long
-      if (j-LONG<0) {
-        ArrayList<Integer> list1 = new ArrayList<>();
-        list1.add(i);
-        intLongTestStart.add(list1);
-      } else {
-        intLongTestStart.get((int)l).add(i);
-      }
-      //String
-      if (j-FLOAT<0) {
-        ArrayList<Integer> list1 = new ArrayList<>();
-        list1.add(i);
-        intFloatTestStart.add(list1);
-      } else {
-        intFloatTestStart.get((int)f).add(i);
-      }
-      //String
-      if (j-DOUBLE<0) {
-        ArrayList<Integer> list1 = new ArrayList<>();
-        list1.add(i);
-        intDoubleTestStart.add(list1);
-      } else {
-        intDoubleTestStart.get((int)d).add(i);
-      }
-      //String
-      if (j-STRING<0) {
-        ArrayList<Integer> list1 = new ArrayList<>();
-        list1.add(i);
-        intStringTestStart.add(list1);
-      } else {
-        intStringTestStart.get(s).add(i);
-      }
-      
-      if (usually()) {
-        assertU(commit()); // to have several segments
-      }
-    }
-    
-    assertU(commit()); 
-    setResponse(h.query(request(fileToStringArr(FieldFacetExtrasTest.class, fileName))));
-  }
-  
-  @Test
-  public void limitTest() throws Exception { 
-
-    Collection<Double> lon = getDoubleList("lr", "fieldFacets", "long_ld", "double", "mean");
-    assertEquals(getRawResponse(), lon.size(),5);
-    Collection<Double> flo = getDoubleList("lr", "fieldFacets", "float_fd", "double", "median");
-    assertEquals(getRawResponse(), flo.size(),3);
-    Collection<Long> doub = getLongList("lr", "fieldFacets", "double_dd", "long", "count");
-    assertEquals(getRawResponse(), doub.size(),7);
-    Collection<Integer> string = getIntegerList("lr", "fieldFacets", "string_sd", "int", "percentile_20");
-    assertEquals(getRawResponse(), string.size(),1);
-  }
-  
-  @Test
-  public void offsetTest() throws Exception { 
-
-    Collection<Double> lon;
-   
-    List<Double> all = new ArrayList<>();
-    lon = getDoubleList("off0", "fieldFacets", "long_ld", "double", "mean");
-    assertEquals(getRawResponse(), lon.size(),2);
-    assertArrayEquals(new Double[]{ 1.5,  2.0 }, lon.toArray(new Double[0]));
-    all.addAll(lon);
-    
-    lon = getDoubleList("off1", "fieldFacets", "long_ld", "double", "mean");
-    assertEquals(getRawResponse(), lon.size(),2);
-    assertArrayEquals(new Double[]{ 3.0,  4.0 }, lon.toArray(new Double[0]));
-    all.addAll(lon);
-    
-    lon = getDoubleList("off2", "fieldFacets", "long_ld", "double", "mean");
-    assertEquals(getRawResponse(), lon.size(),3);
-    assertArrayEquals(new Double[]{ 5.0,  5.75, 6.0 }, lon.toArray(new Double[0]));
-    all.addAll(lon);
-    
-    lon = getDoubleList("offAll", "fieldFacets", "long_ld", "double", "mean");
-    assertEquals(getRawResponse(), lon.size(),7);
-    assertArrayEquals(all.toArray(new Double[0]), lon.toArray(new Double[0]));
-  }
-  
-  @SuppressWarnings("unchecked")
-  @Test
-  public void sortTest() throws Exception { 
-    Collection<Double> lon = getDoubleList("sr", "fieldFacets", "long_ld", "double", "mean");
-    ArrayList<Double> longTest = calculateNumberStat(intLongTestStart, "mean");
-    Collections.sort(longTest);
-    assertEquals(getRawResponse(), longTest,lon);
-    
-    Collection<Double> flo = getDoubleList("sr", "fieldFacets", "float_fd", "double", "median");
-    ArrayList<Double> floatTest = calculateNumberStat(intFloatTestStart, "median");
-    Collections.sort(floatTest,Collections.reverseOrder());
-    assertEquals(getRawResponse(), floatTest,flo);
-    
-    Collection<Long> doub = getLongList("sr", "fieldFacets", "double_dd", "long", "count");
-    ArrayList<Long> doubleTest = (ArrayList<Long>)calculateStat(intDoubleTestStart, "count");
-    Collections.sort(doubleTest);
-    assertEquals(getRawResponse(), doubleTest,doub);
-    
-    Collection<Integer> string = getIntegerList("sr", "fieldFacets", "string_sd", "int", "percentile_20");
-    ArrayList<Integer> stringTest = (ArrayList<Integer>)calculateStat(intStringTestStart, "perc_20");
-    Collections.sort(stringTest,Collections.reverseOrder());
-    assertEquals(getRawResponse(), stringTest,string);
-  }
-
-}


Mime
View raw message