[Mondrian] DialectTest.assertQueryFails() behavior question

Curtis Boyden cboyden at pentaho.com
Fri Feb 22 14:18:38 EST 2013

I have a case where the dialect has allowsCountDistinct() returning
false, even though the database supports this.

My question is what should happen when assertQueryFails() is called but
the query actually succeeds?
My assumption was that the unit test would fail to let us know that the
dialect is incorrect, or that something has changed regarding the database.

What I am actually seeing is that the unit test passes because the
errors are only looked up when an exception is thrown / caught.

The only possibility I see, if my assumption is correct, is that
assertTrue(resultSet.next()); (in assertQueryFails() on line 866) should
actually be assertFalse(...) thus indicating that we have received an
empty resultset.

Can someone please clarify for me the expected behavior of
assertQueryFailes() when the query succeeds?

Thank you,
 - Curtis

More information about the Mondrian mailing list