Package mondrian.test
Class Olap4jTest
- java.lang.Object
-
- TestCase
-
- mondrian.test.FoodMartTestCase
-
- mondrian.test.Olap4jTest
-
public class Olap4jTest extends FoodMartTestCase
Tests mondrian's olap4j API.Test cases in this test could, in principle, be moved to olap4j's test.
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class mondrian.test.FoodMartTestCase
FoodMartTestCase.QueryAndResult
-
-
Field Summary
-
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
-
-
Constructor Summary
Constructors Constructor Description Olap4jTest()Olap4jTest(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static voidcloseOnCompletion(Object statement)CallsStatement.closeOnCompletion() via reflection.(package private) static booleanisClosed(Object statement)CallsStatement.isClosed()orResultSet.isClosed()via reflection.voidtestAnnotation()voidtestBugMondrian1204()voidtestBugMondrian1217()Runs a statement repeatedly, flushing cache every 10 iterations and calling cancel at random intervals.voidtestCalcMemberInCube()voidtestCellProperties()voidtestCloseOnCompletion()voidtestDrillThrough()voidtestFormatString()voidtestLevelProperties()Tests that a property that is not a standard olap4j property but is a Mondrian-builtin property (viz, "FORMAT_EXP") is included among a level's properties.voidtestLimit()Same case asBasicQueryTest.testQueryIterationLimit(), but this time, check that the OlapException has the required SQLstate.voidtestMondrian1353()This is a test for MONDRIAN-1353voidtestMondrian1390()Same asSchemaTest.testMondrian1390()but this time with olap4j.voidtestSameMemberByVariousMeans()Test case for bug MONDRIAN-920, "olap4j: inconsistent measure's member type".-
Methods inherited from class mondrian.test.FoodMartTestCase
allMember, assertAxisReturns, assertAxisThrows, assertBooleanExprReturns, assertExprReturns, assertExprThrows, assertQueriesReturnSimilarResults, assertQueryReturns, assertQueryThrows, assertSize, cubeByName, execute, executeExpr, executeQuery, executeSingletonAxis, genderMembersIncludingAll, getConnection, getDimensionWithName, getTestContext, isDefaultNullMemberRepresentation, isGroupingSetsSupported, member, productMembersPotScrubbersPotsAndPans, storeMembersCAAndOR, storeMembersUsaAndCanada, tearDown, verifySameNativeAndNot, warehouseMembersCanadaMexicoUsa
-
-
-
-
Constructor Detail
-
Olap4jTest
public Olap4jTest()
-
Olap4jTest
public Olap4jTest(String name)
-
-
Method Detail
-
testSameMemberByVariousMeans
public void testSameMemberByVariousMeans() throws SQLExceptionTest case for bug MONDRIAN-920, "olap4j: inconsistent measure's member type".- Throws:
SQLException- on error
-
testAnnotation
public void testAnnotation() throws SQLException- Throws:
SQLException
-
testFormatString
public void testFormatString() throws SQLException- Throws:
SQLException
-
testLevelProperties
public void testLevelProperties() throws SQLExceptionTests that a property that is not a standard olap4j property but is a Mondrian-builtin property (viz, "FORMAT_EXP") is included among a level's properties.- Throws:
SQLException- on error
-
testCellProperties
public void testCellProperties() throws SQLException- Throws:
SQLException
-
testLimit
public void testLimit() throws SQLExceptionSame case asBasicQueryTest.testQueryIterationLimit(), but this time, check that the OlapException has the required SQLstate.- Throws:
SQLException- on error
-
isClosed
static boolean isClosed(Object statement) throws Exception
CallsStatement.isClosed()orResultSet.isClosed()via reflection.- Parameters:
statement- Statement or result set- Returns:
- Whether statement or result set is closed
- Throws:
Exception- on error
-
closeOnCompletion
static void closeOnCompletion(Object statement) throws Exception
CallsStatement.closeOnCompletion() via reflection. (It cannot be called directly because it only exists from JDK 1.7 onwards.)- Parameters:
statement- Statement or result set- Throws:
Exception- on error
-
testBugMondrian1204
public void testBugMondrian1204() throws SQLException- Throws:
SQLException
-
testBugMondrian1217
public void testBugMondrian1217() throws SQLExceptionRuns a statement repeatedly, flushing cache every 10 iterations and calling cancel at random intervals.Test case for
MONDRIAN-1217, "Statement.cancel() during fact query leads to permanent segment lock".- Throws:
SQLException
-
testMondrian1353
public void testMondrian1353() throws ExceptionThis is a test for MONDRIAN-1353An empty stack exception was thrown from the olap4j API if the hierarchy didn't have a all member and the default member was not explicitly set.
- Throws:
Exception
-
testMondrian1390
public void testMondrian1390() throws ExceptionSame asSchemaTest.testMondrian1390()but this time with olap4j.- Throws:
Exception
-
testCalcMemberInCube
public void testCalcMemberInCube() throws SQLExceptionTest case for bug MONDRIAN-1123, "ClassCastException for calculated members that are not part of the measures dimension".- Throws:
SQLException- on error
-
-