Skip to content

Commit

Permalink
Test case for Bug 3312701. calculated measures in virtual cube ignored
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@457 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
pstoellberger committed Jun 24, 2011
1 parent ce511f6 commit 6304f01
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/org/olap4j/impl/Bug.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ public abstract class Bug {
* is fixed.
*/
public static final boolean BugOlap4j3126853Fixed = false;

/**
* Whether
* <a href="http://sourceforge.net/tracker/?func=detail&aid=3312701&group_id=168953&atid=848534">bug 3312701,
* "ConnectionTest.testVirtualCubeCmBug hangs"</a>
* is fixed.
*/
public static final boolean BugOlap4j3312701Fixed = false;
}

// End Bug.java
44 changes: 44 additions & 0 deletions testsrc/org/olap4j/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2031,6 +2031,50 @@ public void testMetadata() throws Exception {
measureNameSet);
}

/**
* Testcase for bug 3312701, "VirtualCube doesn't show
* Calculated Members"
*/
public void testVirtualCubeCmBug() throws Exception {
if (!Bug.BugOlap4j3312701Fixed) {
return;
}
Class.forName(tester.getDriverClassName());
connection = tester.createConnection();
OlapConnection olapConnection =
tester.getWrapper().unwrap(connection, OlapConnection.class);
Cube warehouseSalesCube =
olapConnection
.getOlapCatalogs()
.get("FoodMart")
.getSchemas()
.get("FoodMart")
.getCubes()
.get("Warehouse and Sales");
Set<String> measureVcNameSet = new HashSet<String>();
for (Measure measure : warehouseSalesCube.getMeasures()) {
measureVcNameSet.add(measure.getName());
}
assertEquals(
new HashSet<String>(
Arrays.asList(
"Sales Count",
"Store Cost",
"Store Sales",
"Unit Sales",
"Profit",
"Profit Growth",
"Store Invoice",
"Supply Time",
"Units Ordered",
"Units Shipped",
"Warehouse Cost",
"Warehouse Profit",
"Warehouse Sales",
"Average Warehouse Sale")),
measureVcNameSet);
}

/**
* Testcase for bug 1868075, "Query on ragged hierarchy gives only empty
* cells".
Expand Down

0 comments on commit 6304f01

Please sign in to comment.