db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watzek <mwa.t...@spree.de>
Subject Re: QueryTest issue
Date Thu, 24 Nov 2005 14:34:15 GMT
Hi Andy,

your are right: Changes on class QueryTest related to the SQL patch 
(JDO-165) make the test cases below fail.

Actually, I did not intend this and the spec does not forbid throwing an 
exception in newQuery. So, your question is reasonable and I will fix this.


> There seems to have been some change in QueryTest that now causes some tests 
> to fail that previously passed.
> InvalidUseOfKeywords.testNegative
> KeywordsAsFieldNames.testNegative
> UppercaseLowercase.testNegitve
> These all expect an exception to be thrown and JPOX kindly obliges with 
> JDOUserException, but then the test is marked as an error - seemingly because 
> the exception is thrown when the query is constructed (passing in the single 
> string query, which has errors), and the test is expecting an error at 
> compile time. 
> JPOX policy is to throw the exception at the earliest point possible, which in 
> this case is at the call of PM.newQuery() (since the user has used invalid 
> single-string syntax). Why wait til compile time and tell them then? Was this 
> change to QueryTest intentional ?

Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/

View raw message