Package mondrian.test
Class CacheTest
- java.lang.Object
-
- TestCase
-
- mondrian.test.FoodMartTestCase
-
- mondrian.test.CacheTest
-
public class CacheTest extends FoodMartTestCase
Cunning tests to discover whether the cache manager is working to spec and is thread-safe.- Author:
- Julian Hyde
-
-
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 CacheTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testNQueriesWaitingForSameSegmentRepeat()
Tests that if N queries are executed at the same time, only one segment request will be sent.-
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
-
testNQueriesWaitingForSameSegmentRepeat
public void testNQueriesWaitingForSameSegmentRepeat() throws ExecutionException, InterruptedException
Tests that if N queries are executed at the same time, only one segment request will be sent. The query that arrives second should see that there is a pending segment in the aggregation manager, and should wait for that.If the test fails, look at segmentCreateViaSqlCount. If it has increased by more than one between before and after, the clients have not managed to share work. If it has not increased, the cache was probably not flushed correctly.
-
-