Aleksey Plekhanov created IGNITE-15979:
------------------------------------------

             Summary: Calcite engine. Script test runner ignores "statement 
error" queries result
                 Key: IGNITE-15979
                 URL: https://issues.apache.org/jira/browse/IGNITE-15979
             Project: Ignite
          Issue Type: Bug
            Reporter: Aleksey Plekhanov


Script test runner ignores successful execution for "statement error" queries. 
For example, if a query should fail, but was executed without errors test is 
passed (but should fail).

To fix it, we should modify {{SqlScriptRunner.execute}} method:
{code:java}
gniteException err = null;

try {
    sql(qry);

    if (expected != ExpectedStatementStatus.OK)
        err = new IgniteException("Error expected at: " + posDesc + ". 
Statement: " + this);
}
catch (Throwable e) {
    if (expected != ExpectedStatementStatus.ERROR)
        err = new IgniteException("Error at: " + posDesc + ". Statement: " + 
this, e);
}

if (err != null)
    throw err; {code}
And investigate new failing script tests.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to