jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-288) QueryTests should use the NodeStore apis
Date Thu, 30 Aug 2012 08:09:07 GMT

    [ https://issues.apache.org/jira/browse/OAK-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444778#comment-13444778
] 

Jukka Zitting commented on OAK-288:
-----------------------------------

Generally +1, as the test in sql2.txt are somewhat hard to debug individually and, as you
say, the current setup bypasses the commit hooks.

However, there's quite a bit of value in having a DSL like this for writing a test case. Turning
the tests in sql2.txt to normal Java code with our current APIs would likely at least triple
or quadruple the amount of lines required, drowning the essential bits into boilerplate code.

Can we combine the good bits of both approaches?
                
> QueryTests should use the NodeStore apis
> ----------------------------------------
>
>                 Key: OAK-288
>                 URL: https://issues.apache.org/jira/browse/OAK-288
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Alex Parvulescu
>
> Currently the existing oak query tests come in form of a "script" file [0] that contains

>  - commit commands which will be executed directly against the mk.
>  - select commands
>  - expected results
> while this was good for fast prototyping we should refactor the tests to use proper unit
tests.
> Arguments for refactoring:
>  - overall java style unit tests, reduce the complexity of running this setup
>  - proper reporting unit test failures
>  - executing the commit commands directly against the mk breaks the {{CommitHook}} mechanism
because the commits will pass unnoticed
>  - proper separation of concerns - oak core should not directly reference the mk, it
should pass through exisiting apis like the {{NodeStore}}
> [0] http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2.txt?view=markup

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message