Skip to content

Commit

Permalink
MONDRIAN - fix in 7245 did not take into account caching that results
Browse files Browse the repository at this point in the history
       from previous cancel test; issue a different query in timeout test

[git-p4: depot-paths = "//open/mondrian/": change = 7246]
  • Loading branch information
Zelaine Fong committed Jul 25, 2006
1 parent 25bfbb4 commit 5fbbfaa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions testsrc/main/mondrian/test/BasicQueryTest.java
Expand Up @@ -5237,18 +5237,18 @@ public void run()

public void testQueryTimeout()
{
// timeout is issued after 1 second so the test query needs to
// timeout is issued after 2 seconds so the test query needs to
// run for at least that long
int origTimeout = MondrianProperties.instance().QueryTimeout.get();
MondrianProperties.instance().QueryTimeout.set(1);
MondrianProperties.instance().QueryTimeout.set(2);

String query = fold(new String[] {
"WITH ",
" MEMBER [Measures].[Rank among products] ",
" AS ' Rank([Product].CurrentMember, Order([Product].members, [Measures].[Unit Sales], BDESC)) '",
" AS ' Rank([Product].CurrentMember, Order([Product].members, [Measures].[Promotion Sales], BDESC)) '",
"SELECT CrossJoin(",
" [Gender].members,",
" {[Measures].[Unit Sales],",
" {[Measures].[Promotion Sales],",
" [Measures].[Rank among products]}) ON COLUMNS,",
" {[Product].members} ON ROWS",
"FROM [Sales]"});
Expand All @@ -5259,7 +5259,7 @@ public void testQueryTimeout()
throwable = ex;
}
TestContext.checkThrowable(
throwable, "Query timeout of 1 seconds reached");
throwable, "Query timeout of 2 seconds reached");

// reset the timeout back to the original value
MondrianProperties.instance().QueryTimeout.set(origTimeout);
Expand Down

0 comments on commit 5fbbfaa

Please sign in to comment.