You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/02/15 19:55:28 UTC
[jira] Created: (JCR-2493) Unit tests for persistence managers
Unit tests for persistence managers
-----------------------------------
Key: JCR-2493
URL: https://issues.apache.org/jira/browse/JCR-2493
Project: Jackrabbit Content Repository
Issue Type: Improvement
Components: jackrabbit-core
Reporter: Jukka Zitting
Assignee: Jukka Zitting
Priority: Minor
Currently we only test our persistence managers indirectly via JCR-level test cases. The downside of this approach is that we can only test one persistence manager implementation at a time, and need separate build profiles to switch from one implementation to another. To ensure better coverage and consistent behaviour across all our persistence managers I implemented a simple unit test that works directly against the PersistenceManager interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-2493) Unit tests for persistence managers
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834142#action_12834142 ]
Thomas Mueller commented on JCR-2493:
-------------------------------------
With the H2 database, changing the database URL is enough:
manager.setUrl("jdbc:h2:mem:" + database.getPath());
The memory is automatically released when the connection is closed.
Derby also supports in-memory databases now, but unfortunately
it doesn't release the memory, and there is no nice way to do that manually:
http://wiki.apache.org/db-derby/InMemoryBackEndPrimer
I suggest to only change the H2 JDBC URL.
> Unit tests for persistence managers
> -----------------------------------
>
> Key: JCR-2493
> URL: https://issues.apache.org/jira/browse/JCR-2493
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
> Attachments: JCR-2493.patch
>
>
> Currently we only test our persistence managers indirectly via JCR-level test cases. The downside of this approach is that we can only test one persistence manager implementation at a time, and need separate build profiles to switch from one implementation to another. To ensure better coverage and consistent behaviour across all our persistence managers I implemented a simple unit test that works directly against the PersistenceManager interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-2493) Unit tests for persistence managers
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-2493:
-------------------------------
Attachment: JCR-2493.patch
Patch attached. It covers the modern pool/bundle PMs for Derby and H2 and also test the old-style persistence managers. Currently this adds only about 3% to the time it takes to run the jackrabbit-core test suite, so I'm thinking of simply including it in the default test run, but if people prefer we can also put it in a separate integration test profile.
> Unit tests for persistence managers
> -----------------------------------
>
> Key: JCR-2493
> URL: https://issues.apache.org/jira/browse/JCR-2493
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
> Attachments: JCR-2493.patch
>
>
> Currently we only test our persistence managers indirectly via JCR-level test cases. The downside of this approach is that we can only test one persistence manager implementation at a time, and need separate build profiles to switch from one implementation to another. To ensure better coverage and consistent behaviour across all our persistence managers I implemented a simple unit test that works directly against the PersistenceManager interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-2493) Unit tests for persistence managers
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834116#action_12834116 ]
Thomas Mueller commented on JCR-2493:
-------------------------------------
To speed up the test, I will try to change the test case to use an in-memory database by default.
> Unit tests for persistence managers
> -----------------------------------
>
> Key: JCR-2493
> URL: https://issues.apache.org/jira/browse/JCR-2493
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
> Attachments: JCR-2493.patch
>
>
> Currently we only test our persistence managers indirectly via JCR-level test cases. The downside of this approach is that we can only test one persistence manager implementation at a time, and need separate build profiles to switch from one implementation to another. To ensure better coverage and consistent behaviour across all our persistence managers I implemented a simple unit test that works directly against the PersistenceManager interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-2493) Unit tests for persistence managers
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved JCR-2493.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.1.0
Patch committed in revision 910526. Good idea about in-memory databases. I updated the H2 JDBC URLs.
> Unit tests for persistence managers
> -----------------------------------
>
> Key: JCR-2493
> URL: https://issues.apache.org/jira/browse/JCR-2493
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
> Fix For: 2.1.0
>
> Attachments: JCR-2493.patch
>
>
> Currently we only test our persistence managers indirectly via JCR-level test cases. The downside of this approach is that we can only test one persistence manager implementation at a time, and need separate build profiles to switch from one implementation to another. To ensure better coverage and consistent behaviour across all our persistence managers I implemented a simple unit test that works directly against the PersistenceManager interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.