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 void
closeOnCompletion(Object statement)
CallsStatement
.closeOnCompletion() via reflection.(package private) static boolean
isClosed(Object statement)
CallsStatement.isClosed()
orResultSet.isClosed()
via reflection.void
testAnnotation()
void
testBugMondrian1204()
void
testBugMondrian1217()
Runs a statement repeatedly, flushing cache every 10 iterations and calling cancel at random intervals.void
testCalcMemberInCube()
void
testCellProperties()
void
testCloseOnCompletion()
void
testDrillThrough()
void
testFormatString()
void
testLevelProperties()
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.void
testLimit()
Same case asBasicQueryTest.testQueryIterationLimit()
, but this time, check that the OlapException has the required SQLstate.void
testMondrian1353()
This is a test for MONDRIAN-1353void
testMondrian1390()
Same asSchemaTest.testMondrian1390()
but this time with olap4j.void
testSameMemberByVariousMeans()
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 SQLException
Test 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 SQLException
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.- Throws:
SQLException
- on error
-
testCellProperties
public void testCellProperties() throws SQLException
- Throws:
SQLException
-
testLimit
public void testLimit() throws SQLException
Same 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 SQLException
Runs 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 Exception
This 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 Exception
Same asSchemaTest.testMondrian1390()
but this time with olap4j.- Throws:
Exception
-
testCalcMemberInCube
public void testCalcMemberInCube() throws SQLException
Test case for bug MONDRIAN-1123, "ClassCastException for calculated members that are not part of the measures dimension".- Throws:
SQLException
- on error
-
-