[Mondrian] Running the JUnit tests

Julian Hyde jhyde at pentaho.com
Wed Mar 21 20:24:45 EDT 2012

There are a few places where an InlineTable cannot be used in place of a regular table. (Not that it shouldn't -- but it's never been implemented.) I can well believe that this is one of those.

Sorry! I know it would have made it easier to write the test. InlineTable support will be better in mondrian-4, by the way.

Did you try extending CsvDBTestCase? That allows you to create a table at the start of the test, and drop it at the end.


On Mar 21, 2012, at 1:30 PM, Patrick Leckey wrote:


I am working with TestContext.create() as you suggested, and am trying to accomplish this with an inline table (since I need data not in the FoodMart SQL).  It looks promising, but I the test is failing with the following error:

Mondrian Error:Internal error: no table 'store_management' found in hierarchy [Store Managers.Manager]

Which seems to be failing in HierarchyUsage.findJoinTable() (specifically the exception thrown at line 429).  Are inline tables not able to be used this way?

I have defined the cube I am adding with TestContext.create() as follows:

<Cube name="ClosureTest">
<InlineTable alias="store_management">
<ColumnDef name="store_id" type="Numeric"/>
<ColumnDef name="employee_id" type="Numeric"/>
<ColumnDef name="supervisor_id" type="Numeric"/>
<ColumnDef name="manager_rank" type="Numeric"/>
<Value column="store_id">2</Value>
<Value column="employee_id">29</Value>
<Value column="supervisor_id">22</Value>
<Value column="manager_rank">1</Value>
<Value column="store_id">3</Value>
<Value column="employee_id">30</Value>
<Value column="supervisor_id">22</Value>
<Value column="manager_rank">2</Value>
<Value column="store_id">4</Value>
<Value column="employee_id">15</Value>
<Value column="supervisor_id">5</Value>
<Value column="manager_rank">3</Value>
<Value column="store_id">5</Value>
<Value column="employee_id">12</Value>
<Value column="supervisor_id">5</Value>
<Value column="manager_rank">4</Value>
 <Dimension name="Store Managers" foreignKey="store_id">
        <Hierarchy hasAll="true" allMemberName="All Managers"
                   primaryKey="store_id" primaryKeyTable="store_management"
            <Table name="employee"/>
            <Level name="Employee Id" type="Numeric" uniqueMembers="true"
                   column="employee_id" parentColumn="supervisor_id"
                   nameColumn="full_name" nullParentValue="0">
                <Closure parentColumn="supervisor_id" childColumn="employee_id">
                    <Table name="employee_closure"/>

    <Measure name="Rank" column="manager_rank" aggregator="min" formatString="Standard"/>

Mondrian mailing list
Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20120321/fbc064cf/attachment.html 

More information about the Mondrian mailing list