[ 
https://issues.apache.org/jira/browse/JCR-1452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575306#action_12575306
 ] 

Thomas Mueller commented on JCR-1452:
-------------------------------------

Tests should find as many problems as possible as quickly as possible. Running 
a quick version of the same tests before checkin helps finding problems quicker 
(avoiding a broken build). 

> that's a completely different test case than the "blob that is too large to 
> fit in memory" one.

Yes and no. When using 50 KB let's say 360 lines of code are executed; with 500 
MB probably the same 360 lines. If somebody changes the code and breaks one of 
those lines, the 50 KB test would also find the problem, except the out of 
memory problem. The global data store stores very small blobs inline (using a 
different class). It would be strange to write three distinct tests, one with 
500 MB, one with 50 KB, and another for 50 bytes.

> there should be some reason for it to exist.

I think you agree that tests exist to test the source code. Running the test 
with 50 KB does that.

> we shouldn't just test things because we can. 

There are two kinds of tests: tests that are written after finding a bug, and 
tests that are written to prevent bugs. Preventing bugs is more efficient, see 
also http://www.ambysoft.com/essays/whyAgileWorksFeedback.html (you can ignore 
the text ;-).

> The TCK already has a number of binary property test cases

I would prefer adding a loop to the TCK tests (5 bytes, 50 bytes, ... 500 MB) 
instead of writing a new test. But as you know extending the TCK is not that 
simple. Also, the TCK is not (yet) run regularly AFAIK.

> optimally no two tests should target the same thing.

I would rather write a new tests than trying to enforce this rule.

> org.apache.jackrabbit.core.daily test package 

Some tests require package access. Also, one package would not be enough, you 
would need a 'daily' package for every package.

I prefer to use the 'scale' system property.


> Make use of jackrabbit.test.scale in test cases
> -----------------------------------------------
>
>                 Key: JCR-1452
>                 URL: https://issues.apache.org/jira/browse/JCR-1452
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core
>            Reporter: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.5
>
>
> There are already a number of longer running test cases in jackrabbit-core, 
> but they are all disabled because they otherwise make building 
> jackrabbit-core a very long task.
> Those tests should make use of the jackrabbit.test.scale property and per 
> default (scale = 1) run within a short time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to