public class MemberCacheControlTest extends FoodMartTestCase
The purpose of the cache control API is to clear the cache so that changes made to the DBMS can be seen. However, it is difficult to write tests that modify the database. So these tests just check that the relevant caches have been cleared. It is assumed that the updated values will be loaded next time mondrian goes to the database.
propSaver
Constructor and Description |
---|
MemberCacheControlTest() |
MemberCacheControlTest(String name) |
Modifier and Type | Method and Description |
---|---|
protected static RolapMember |
findMember(TestContext tc,
String cubeName,
String... names)
Finds a Member by its name and the name of its containing cube.
|
(package private) DiffRepository |
getDiffRepos() |
TestContext |
getTestContext()
Returns the test context.
|
protected void |
setUp() |
protected void |
tearDown() |
void |
testAddCommand() |
void |
testAddCommandNegative()
Tests a variety of negative cases including add/delete/move null members
add/delete/move members in parent-child hierarchies.
|
void |
testDeleteCommand() |
void |
testFilter()
Tests operations on member sets, in particular the
CacheControl.filter(mondrian.olap.Level, mondrian.olap.CacheControl.MemberSet) method. |
void |
testFlushHierarchy()
Test case for bug
MONDRIAN-1076,
"Add CacheControl API to flush members from dimension cache".
|
void |
testMemberOpsFailIfCacheEnabled()
Tests that member operations fail if cache is enabled.
|
void |
testMoveCommand() |
void |
testMoveFailBadLevel() |
void |
testSetPropertyCommandOnLeafMember()
Test that edits the properties of a single leaf Member.
|
void |
testSetPropertyCommandOnNonLeafMember()
Test that edits properties of Members at various Levels (use Retail
Dimension), but leaves grouping unchanged, so results not changed.
|
allMember, assertAxisReturns, assertAxisThrows, assertBooleanExprReturns, assertExprReturns, assertExprThrows, assertQueriesReturnSimilarResults, assertQueryReturns, assertQueryThrows, assertSize, cubeByName, execute, executeExpr, executeQuery, executeSingletonAxis, genderMembersIncludingAll, getConnection, getDimensionWithName, isDefaultNullMemberRepresentation, isGroupingSetsSupported, member, productMembersPotScrubbersPotsAndPans, storeMembersCAAndOR, storeMembersUsaAndCanada, warehouseMembersCanadaMexicoUsa
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
public MemberCacheControlTest()
public MemberCacheControlTest(String name)
protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
protected void tearDown() throws Exception
tearDown
in class FoodMartTestCase
Exception
DiffRepository getDiffRepos()
public TestContext getTestContext()
FoodMartTestCase
getTestContext
in class FoodMartTestCase
protected static RolapMember findMember(TestContext tc, String cubeName, String... names)
tc
- Test contextcubeName
- Cube namenames
- the full-qualified Member nameMondrianException
- when not found.public void testFilter()
CacheControl.filter(mondrian.olap.Level, mondrian.olap.CacheControl.MemberSet)
method.public void testMemberOpsFailIfCacheEnabled()
public void testSetPropertyCommandOnLeafMember()
public void testSetPropertyCommandOnNonLeafMember()
public void testAddCommand()
public void testDeleteCommand()
public void testMoveCommand()
public void testMoveFailBadLevel()
public void testAddCommandNegative()
public void testFlushHierarchy()