Skip to content

Commit

Permalink
MONDRIAN: Fixes a woopsie.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 14452]
  • Loading branch information
lucboudreau committed Jul 13, 2011
1 parent 48b8c6e commit fa95076
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions testsrc/main/mondrian/rolap/BatchTestCase.java
Expand Up @@ -260,6 +260,11 @@ protected void assertRequestSql(
// behave exactly the same as the current DataSource.
RolapUtil.threadHooks = new TriggerHook(trigger);
Bomb bomb;
final Locus locus =
new Locus(
new Execution(null, 1000),
"BatchTestCase",
"BatchTestCase");
try {
FastBatchingCellReader fbcr =
new FastBatchingCellReader(getCube(cubeName));
Expand All @@ -268,17 +273,14 @@ protected void assertRequestSql(
}
// The FBCR will presume there is a current Locus in the stack,
// so let's create a mock one.
Locus.push(
new Locus(
new Execution(null, 1000),
"BatchTestCase",
"BatchTestCase"));
Locus.push(locus);
fbcr.loadAggregations(null);
bomb = null;
} catch (Bomb e) {
bomb = e;
} finally {
RolapUtil.threadHooks = null;
Locus.pop(locus);
}
if (!negative && bomb == null) {
fail("expected query [" + sql + "] did not occur");
Expand Down

0 comments on commit fa95076

Please sign in to comment.