Skip to content

Commit

Permalink
MONDRIAN: Enable some forgotten tests; fix Excel test under JDK1.4.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian-release/3.2/": change = 13771]
  • Loading branch information
julianhyde committed Jul 27, 2010
1 parent bd35cba commit 232972f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 17 deletions.
4 changes: 2 additions & 2 deletions testsrc/main/mondrian/olap/fun/vba/ExcelTest.java
Expand Up @@ -2,7 +2,7 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2007-2009 Julian Hyde
// Copyright (C) 2007-2010 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
Expand Down Expand Up @@ -86,7 +86,7 @@ public void testDegrees() {

public void testLog10() {
assertEquals(1.0, Excel.log10(10));
assertEquals(-2.0, Excel.log10(.01));
assertEquals(-2.0, Excel.log10(.01), 0.00000000000001);
}

public void testPi() {
Expand Down
8 changes: 5 additions & 3 deletions testsrc/main/mondrian/test/CVConcurrentMdxTest.java
Expand Up @@ -3,7 +3,7 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2002-2009 Julian Hyde and others
// Copyright (C) 2002-2010 Julian Hyde and others
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
//
Expand Down Expand Up @@ -125,8 +125,10 @@ public void testConcurrentCVQueriesInRandomOrder() {
// generate list of queries and results
QueryAndResult[] queryList = generateQueryArray(testList);

assertTrue(ConcurrentValidatingQueryRunner.runTest(
3, 100, true, true, true, queryList).size() == 0);
assertEquals(
Collections.<Throwable>emptyList(),
ConcurrentValidatingQueryRunner.runTest(
3, 100, true, true, true, queryList));
}

protected void tearDown() throws Exception {
Expand Down
48 changes: 36 additions & 12 deletions testsrc/main/mondrian/test/Main.java
Expand Up @@ -16,32 +16,32 @@
import java.io.PrintWriter;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.*;
import java.util.Enumeration;
import java.util.*;
import java.util.regex.Pattern;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestResult;
import junit.framework.TestSuite;
import junit.framework.*;

import mondrian.olap.fun.*;
import mondrian.olap.fun.vba.VbaTest;
import mondrian.calc.impl.ConstantCalcTest;
import mondrian.olap.*;
import mondrian.olap.fun.*;
import mondrian.olap.fun.vba.*;
import mondrian.olap.type.TypeTest;
import mondrian.rolap.*;
import mondrian.rolap.agg.AggregationOnDistinctCountMeasuresTest;
import mondrian.rolap.agg.SegmentLoaderTest;
import mondrian.rolap.aggmatcher.*;
import mondrian.rolap.sql.SelectNotInGroupByTest;
import mondrian.rolap.sql.SqlQueryTest;
import mondrian.test.build.CodeComplianceTest;
import mondrian.test.clearview.*;
import mondrian.test.comp.ResultComparatorTest;
import mondrian.udf.*;
import mondrian.udf.NullValueTest;
import mondrian.util.*;
import mondrian.xmla.*;
import mondrian.xmla.impl.DynamicDatasourceXmlaServletTest;
import mondrian.xmla.test.XmlaTest;
import mondrian.test.clearview.*;
import mondrian.test.build.CodeComplianceTest;
import mondrian.calc.impl.ConstantCalcTest;
import mondrian.rolap.agg.AggregationOnDistinctCountMeasuresTest;
import mondrian.rolap.aggmatcher.MultipleColsInTupleAggTest;

import org.apache.log4j.Logger;

Expand All @@ -62,6 +62,8 @@ public class Main extends TestSuite {
private static Map<TestSuite, String> testSuiteInfo =
new HashMap<TestSuite, String>();

private static final boolean RUN_OPTIONAL_TESTS = false;

/**
* Entry point to run test suite from the command line.
*
Expand Down Expand Up @@ -185,6 +187,26 @@ public static Test suite() throws Exception {
addTest(suite, (Test) o, clazz.getName() + method.getName());
}
} else {
if (RUN_OPTIONAL_TESTS) {
addTest(suite, SegmentLoaderTest.class); // 2f, 1e as of 13571
addTest(suite, AggGenTest.class); // passes
addTest(suite, DefaultRuleTest.class); // passes
addTest(suite, SelectNotInGroupByTest.class);
addTest(suite, CVConcurrentMdxTest.class);
addTest(suite, CacheHitTest.class);
addTest(suite, ConcurrentMdxTest.class);
addTest(suite, MemHungryTest.class, "suite");
addTest(suite, MultiDimTest.class, "suite");
addTest(suite, MultiDimVCTest.class, "suite");
addTest(suite, MultiLevelTest.class, "suite");
addTest(suite, MultiLevelVCTest.class, "suite");
addTest(suite, PartialCacheTest.class, "suite");
addTest(suite, PartialCacheVCTest.class, "suite");
addTest(suite, QueryAllTest.class, "suite");
addTest(suite, QueryAllVCTest.class, "suite");
addTest(suite, Base64Test.class);
return suite;
}
addTest(suite, RolapConnectionTest.class);
addTest(suite, FilteredIterableTest.class);
addTest(suite, HighDimensionsTest.class);
Expand Down Expand Up @@ -213,6 +235,7 @@ public static Test suite() throws Exception {
addTest(suite, FunctionTest.class);
addTest(suite, PartialSortTest.class);
addTest(suite, VbaTest.class);
addTest(suite, ExcelTest.class);
addTest(suite, HierarchyBugTest.class);
addTest(suite, ScheduleTest.class);
addTest(suite, UtilTestCase.class);
Expand Down Expand Up @@ -282,6 +305,7 @@ public static Test suite() throws Exception {
suite,
IgnoreMeasureForNonJoiningDimensionInAggregationTest.class);
addTest(suite, SetFunDefTest.class);
addTest(suite, VisualTotalsTest.class);
addTest(suite, AggregationOnDistinctCountMeasuresTest.class);
addTest(suite, BitKeyTest.class);
addTest(suite, TypeTest.class);
Expand Down

0 comments on commit 232972f

Please sign in to comment.