Skip to content

Commit

Permalink
MONDRIAN: Disable test which seems to be corrupting the cache (bug 17…
Browse files Browse the repository at this point in the history
…10913 logged).

[git-p4: depot-paths = "//open/mondrian/": change = 9196]
  • Loading branch information
julianhyde committed May 2, 2007
1 parent 6bfa66b commit 3a1b346
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 34 deletions.
7 changes: 7 additions & 0 deletions src/main/mondrian/util/Bug.java
Expand Up @@ -46,6 +46,13 @@ public class Bug {
*/
public static final boolean Bug1530543Fixed = false;

/**
* Whether
* <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1710913&group_id=35302&atid=414613">bug 1710913, "Query with Filter(..., Count ...) corrupts cache"</a>
* is fixed.
*/
public static final boolean Bug1710913Fixed = false;

/**
* Returns whether to avoid a test because the memory monitor may cause it
* to fail.
Expand Down
65 changes: 31 additions & 34 deletions testsrc/main/mondrian/test/BasicQueryTest.java
Expand Up @@ -544,67 +544,62 @@ public void testGoodComments() {
}
}
allCommentList.add("");
final String[] allComments = (String[])
allCommentList.toArray(new String[allCommentList.size()]);
final String[] allComments =
allCommentList.toArray(new String[allCommentList.size()]);

// The last element of the array is the concatenation of all other
// comments.
StringBuilder buf = new StringBuilder();
for (int i = 0; i < allComments.length; i++) {
buf.append(allComments[i]);
for (String allComment : allComments) {
buf.append(allComment);
}
allComments[allComments.length - 1] = buf.toString();

// Comment at start of query.
for (int i = 0; i < allComments.length; i++) {
String comment = allComments[i];
for (String comment : allComments) {
assertQueryReturns(
comment + "SELECT {} ON ROWS, {} ON COLUMNS FROM [Sales]",
EmptyResult);
comment + "SELECT {} ON ROWS, {} ON COLUMNS FROM [Sales]",
EmptyResult);
}

// Comment after SELECT.
for (int i = 0; i < allComments.length; i++) {
String comment = allComments[i];
for (String comment : allComments) {
assertQueryReturns(
"SELECT" + comment + "{} ON ROWS, {} ON COLUMNS FROM [Sales]",
EmptyResult);
"SELECT" + comment + "{} ON ROWS, {} ON COLUMNS FROM [Sales]",
EmptyResult);
}

// Comment within braces.
for (int i = 0; i < allComments.length; i++) {
String comment = allComments[i];
for (String comment : allComments) {
assertQueryReturns(
"SELECT {" + comment + "} ON ROWS, {} ON COLUMNS FROM [Sales]",
EmptyResult);
"SELECT {" + comment + "} ON ROWS, {} ON COLUMNS FROM [Sales]",
EmptyResult);
}

// Comment after axis name.
for (int i = 0; i < allComments.length; i++) {
String comment = allComments[i];
for (String comment : allComments) {
assertQueryReturns(
"SELECT {} ON ROWS" + comment + ", {} ON COLUMNS FROM [Sales]",
EmptyResult);
"SELECT {} ON ROWS" + comment + ", {} ON COLUMNS FROM [Sales]",
EmptyResult);
}

// Comment before slicer.
for (int i = 0; i < allComments.length; i++) {
String comment = allComments[i];
for (String comment : allComments) {
assertQueryReturns(
"SELECT {} ON ROWS, {} ON COLUMNS FROM [Sales] WHERE" + comment + "([Gender].[F])",
fold(
"Axis #0:\n" +
"SELECT {} ON ROWS, {} ON COLUMNS FROM [Sales] WHERE" +
comment + "([Gender].[F])",
fold(
"Axis #0:\n" +
"{[Gender].[All Gender].[F]}\n" +
"Axis #1:\n" +
"Axis #2:\n"));
}

// Comment after query.
for (int i = 0; i < allComments.length; i++) {
String comment = allComments[i];
for (String comment : allComments) {
assertQueryReturns(
"SELECT {} ON ROWS, {} ON COLUMNS FROM [Sales]" + comment,
EmptyResult);
"SELECT {} ON ROWS, {} ON COLUMNS FROM [Sales]" + comment,
EmptyResult);
}


Expand Down Expand Up @@ -2421,6 +2416,7 @@ public void testBug761952() {
"Row #0: 131,558\n" +
"Row #1: 135,215\n"));
}

/**
* Query with distinct-count measure and no other measures gives
* {@link ArrayIndexOutOfBoundsException}
Expand Down Expand Up @@ -5677,16 +5673,17 @@ public void testDefaultMeasureInCubeForCaseSensitivity() {
}

}

/**
* This tests for bug #1706434
* The ability to convert numeric types to logical (boolean) types
* This tests for bug #1706434,
* the ability to convert numeric types to logical (boolean) types.
*/
public void testNumericToLogicalConversion() {
assertQueryReturns("select " +
if (!Bug.Bug1710913Fixed) return;
assertQueryReturns("select " +
"{[Measures].[Unit Sales]} on columns, " +
"Filter(Descendants( " +
"[Product].[Food].[Baked Goods].[Bread]), " +
"[Product].[Food].[Baked Goods].[Bread]), " +
"Count([Product].currentMember.children)) on Rows " +
"from [Sales]",
fold("Axis #0:\n" +
Expand Down

0 comments on commit 3a1b346

Please sign in to comment.