Skip to content

Commit

Permalink
Fixes some failures introduced by the change to Mondrian 4.0.
Browse files Browse the repository at this point in the history
The drillthrough resultsets have changed a bit.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@545 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Aug 8, 2012
1 parent 24cd3e6 commit 138579e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 31 deletions.
6 changes: 0 additions & 6 deletions simple-jndi/jdbc.properties

This file was deleted.

40 changes: 15 additions & 25 deletions testsrc/org/olap4j/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1194,8 +1194,9 @@ public void testCell() throws Exception {
// Most databases return 5 columns. Derby returns 9 because of
// 4 columns in the ORDER BY clause.
assertTrue(metaData.getColumnCount() >= 5);
assertEquals("Year", metaData.getColumnLabel(1));
assertEquals("Store Sales", metaData.getColumnLabel(5));
assertEquals("Day (Key)", metaData.getColumnLabel(1));
assertEquals("Quarter (Key)", metaData.getColumnLabel(2));
assertEquals("Store Sales", metaData.getColumnLabel(11));
resultSet.close();
break;
}
Expand Down Expand Up @@ -3140,11 +3141,7 @@ public void testCubesDrillthroughReturnClause6() throws Exception {
assertDrillRowsEquals(
rs,
new String[] {
"ROW:1.27,",
"ROW:1.95,",
"ROW:2.82,",
"ROW:2.84,",
"ROW:3.46,"
"ROW:12.34,"
});
}

Expand All @@ -3168,11 +3165,7 @@ public void testCubesDrillthroughReturnClause7() throws Exception {
assertDrillRowsEquals(
rs,
new String[] {
"ROW:USA,1.27,",
"ROW:USA,1.95,",
"ROW:USA,2.82,",
"ROW:USA,2.84,",
"ROW:USA,3.46,"
"ROW:USA,12.34,"
});
}

Expand All @@ -3196,17 +3189,14 @@ public void testCubesDrillthroughReturnClause8() throws Exception {
assertDrillRowsEquals(
rs,
new String[] {
"ROW:Walla Walla,1.27,",
"ROW:Walla Walla,1.95,",
"ROW:Walla Walla,2.82,",
"ROW:Walla Walla,2.84,",
"ROW:Walla Walla,3.46,"
"ROW:WA,Walla Walla,12.34,"
});
}

/**
* Drillthrough with a measure on the axis and no RETURN
* clause specified.
* clause specified. By default we return whatever is
* in the slicer, plus the individual measure values.
*/
public void testCubesDrillthroughReturnClause9() throws Exception {
if (tester.getFlavor().equals(Flavor.XMLA)
Expand All @@ -3224,11 +3214,11 @@ public void testCubesDrillthroughReturnClause9() throws Exception {
assertDrillRowsEquals(
rs,
new String[] {
"ROW:WA,Walla Walla,Store 22,null,Small Grocery,1997.0,Q3,8.0,34.0,14.0,Food,Baked Goods,Bread,Muffins,Great,Great Muffins,Sunday Paper,One Day Sale,USA,WA,Walla Walla,Joe. Burnett,7293.0,Partial High School,M,S,$30K - $50K,1.0,",
"ROW:WA,Walla Walla,Store 22,null,Small Grocery,1997.0,Q3,8.0,34.0,14.0,Food,Baked Goods,Bread,Muffins,Modell,Modell Cranberry Muffins,Sunday Paper,One Day Sale,USA,WA,Walla Walla,Geraldine Aubrecht,5956.0,Partial High School,M,S,$30K - $50K,1.0,",
"ROW:WA,Walla Walla,Store 22,null,Small Grocery,1997.0,Q3,8.0,34.0,14.0,Food,Baked Goods,Bread,Sliced Bread,Colony,Colony White Bread,Sunday Paper,One Day Sale,USA,WA,Walla Walla,Rena Shaw,6013.0,Partial High School,M,M,$10K - $30K,2.0,",
"ROW:WA,Walla Walla,Store 22,null,Small Grocery,1997.0,Q3,9.0,38.0,10.0,Food,Baked Goods,Bread,Muffins,Modell,Modell Blueberry Muffins,Cash Register Handout,One Day Sale,USA,WA,Walla Walla,Laura Welden,7683.0,High School Degree,F,M,$50K - $70K,1.0,",
"ROW:WA,Walla Walla,Store 22,null,Small Grocery,1997.0,Q3,9.0,38.0,10.0,Food,Baked Goods,Bread,Sliced Bread,Sphinx,Sphinx Wheat Bread,Cash Register Handout,One Day Sale,USA,WA,Walla Walla,Laura Welden,7683.0,High School Degree,F,M,$50K - $70K,1.0,"
"ROW:WA,Walla Walla,Store 22,1997.0,Q3,8.0,Food,Baked Goods,Bread,Muffins,Great,Great Muffins,One Day Sale,1.0,",
"ROW:WA,Walla Walla,Store 22,1997.0,Q3,8.0,Food,Baked Goods,Bread,Muffins,Modell,Modell Cranberry Muffins,One Day Sale,1.0,",
"ROW:WA,Walla Walla,Store 22,1997.0,Q3,8.0,Food,Baked Goods,Bread,Sliced Bread,Colony,Colony White Bread,One Day Sale,2.0,",
"ROW:WA,Walla Walla,Store 22,1997.0,Q3,9.0,Food,Baked Goods,Bread,Muffins,Modell,Modell Blueberry Muffins,One Day Sale,1.0,",
"ROW:WA,Walla Walla,Store 22,1997.0,Q3,9.0,Food,Baked Goods,Bread,Sliced Bread,Sphinx,Sphinx Wheat Bread,One Day Sale,1.0,"
});
}

Expand All @@ -3252,8 +3242,8 @@ private void assertDrillRowsEquals(
Arrays.sort(expected);
for (int i = 0; i < rows.size(); i++) {
assertEquals(
rows.get(i),
expected[i]);
expected[i],
rows.get(i));
}
}

Expand Down

0 comments on commit 138579e

Please sign in to comment.