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(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static void
closeOnCompletion(java.lang.Object statement)
CallsStatement
.closeOnCompletion() via reflection.(package private) static boolean
isClosed(java.lang.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
-
-
-
-
Method Detail
-
testSameMemberByVariousMeans
public void testSameMemberByVariousMeans() throws java.sql.SQLException
Test case for bug MONDRIAN-920, "olap4j: inconsistent measure's member type".- Throws:
java.sql.SQLException
- on error
-
testAnnotation
public void testAnnotation() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
testFormatString
public void testFormatString() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
testLevelProperties
public void testLevelProperties() throws java.sql.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:
java.sql.SQLException
- on error
-
testCellProperties
public void testCellProperties() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
testLimit
public void testLimit() throws java.sql.SQLException
Same case asBasicQueryTest.testQueryIterationLimit()
, but this time, check that the OlapException has the required SQLstate.- Throws:
java.sql.SQLException
- on error
-
testCloseOnCompletion
public void testCloseOnCompletion() throws java.lang.Exception
- Throws:
java.lang.Exception
-
isClosed
static boolean isClosed(java.lang.Object statement) throws java.lang.Exception
CallsStatement.isClosed()
orResultSet.isClosed()
via reflection.- Parameters:
statement
- Statement or result set- Returns:
- Whether statement or result set is closed
- Throws:
java.lang.Exception
- on error
-
closeOnCompletion
static void closeOnCompletion(java.lang.Object statement) throws java.lang.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:
java.lang.Exception
- on error
-
testDrillThrough
public void testDrillThrough() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testBugMondrian1204
public void testBugMondrian1204() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
testBugMondrian1217
public void testBugMondrian1217() throws java.sql.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:
java.sql.SQLException
-
testMondrian1353
public void testMondrian1353() throws java.lang.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:
java.lang.Exception
-
testMondrian1390
public void testMondrian1390() throws java.lang.Exception
Same asSchemaTest.testMondrian1390()
but this time with olap4j.- Throws:
java.lang.Exception
-
testCalcMemberInCube
public void testCalcMemberInCube() throws java.sql.SQLException
Test case for bug MONDRIAN-1123, "ClassCastException for calculated members that are not part of the measures dimension".- Throws:
java.sql.SQLException
- on error
-
-