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

ASF GitHub Bot commented on JCR-4008:
-------------------------------------

GitHub user woonsan opened a pull request:

    https://github.com/apache/jackrabbit/pull/40

    JCR-4008: Restore TestCachingFDS.testDeleteRecord() to fix it without aync 
writing

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/woonsan/jackrabbit bugfix/JCR-4008

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jackrabbit/pull/40.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #40
    
----
commit a8259e2a141ae7d0b9aedcb7b24638817b6e6ac8
Author: Woonsan Ko <[email protected]>
Date:   2016-08-27T00:07:30Z

    JCR-4006: When async write pool size is zero or smaller, don't write 
asynchronously.

commit 42f96c5d0ede9e102c49c513cc61160a7a701f90
Author: Woonsan Ko <[email protected]>
Date:   2016-08-27T00:32:14Z

    JCR-4006: double-checked locking on asyncWriteExecutor. By the way, the 
reason why lazy-initialization is because S3Backend and FSBackend have yet 
another init() method which makes it difficult to initialize once in the 
original init method.

commit bdb05c3c9e23cca6bd6083618724cbe392400674
Author: Woonsan Ko <[email protected]>
Date:   2016-08-27T01:07:06Z

    JCR-4006: enable TestCachingFDS#doDeleteRecordTest() with disabling async 
writing in unit test.

commit 00bdb6d4c3e06bfd0065263f1b5aeb65f51836c8
Author: Woonsan Ko <[email protected]>
Date:   2016-08-27T01:18:16Z

    JCR-4006: Add homeDir and config in AbstractBackend as clean up.

commit 30f5229805f2ed6a54dc2310c56324ad2c747bb9
Author: Woonsan Ko <[email protected]>
Date:   2016-08-27T02:42:14Z

    JCR-4006: disable async writing in TestCachingFDSCacheOff as well.

----


> Restore TestCachingFDS.testDeleteRecord() to fix it without aync writing
> ------------------------------------------------------------------------
>
>                 Key: JCR-4008
>                 URL: https://issues.apache.org/jira/browse/JCR-4008
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>            Reporter: Woonsan Ko
>
> The test used to fail occasionally before the test method was commented out 
> by JCR-4006:
> {noformat}
> junit.framework.AssertionFailedError: rec2 should be null
>       at junit.framework.Assert.fail(Assert.java:50)
>       at junit.framework.Assert.assertTrue(Assert.java:20)
>       at junit.framework.Assert.assertNull(Assert.java:237)
>       at 
> org.apache.jackrabbit.core.data.TestCaseBase.doDeleteRecordTest(TestCaseBase.java:327)
>       at 
> org.apache.jackrabbit.core.data.TestCaseBase.testDeleteRecord(TestCaseBase.java:192)
> {noformat}
> The main reason of this error is because the underlying backend uses 
> asynchronous writing threads by default, which is not working well when 
> extending {{org.apache.jackrabbit.core.data.TestCaseBase}} as mentioned in 
> JCR-4005.
> So, it seems better to fix it again like the following like how JCR-4005 was 
> fixed:
> - Restore the commented out block ({{TestCachingFDS.testDeleteRecord()}}).
> - Provide an option to disable asynchronous writing in all the related 
> backend implementations. e.g., disable it if {{asyncWritePoolSize}} is zero 
> or smaller.
> - In unit tests, simply disable async writing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to