You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Joseph Chen (JIRA)" <ji...@apache.org> on 2005/10/26 20:22:55 UTC
[jira] Created: (JCR-262) In AbstractImportXmlTest, a bug in getUnusedUri() causes URI length to grow too quickly, causing test to fail when using ORM-PM
In AbstractImportXmlTest, a bug in getUnusedUri() causes URI length to grow too quickly, causing test to fail when using ORM-PM
-------------------------------------------------------------------------------------------------------------------------------
Key: JCR-262
URL: http://issues.apache.org/jira/browse/JCR-262
Project: Jackrabbit
Type: Test
Components: API
Versions: 1.0
Reporter: Joseph Chen
Priority: Minor
Test fails when using ORM-PM because the URI exceeds the column size in the database.
Here is the current implementation:
protected String getUnusedURI() throws RepositoryException {
Set uris = new HashSet(Arrays.asList(nsp.getURIs()));
String uri = TEST_URI;
int i = 0;
while (uris.contains(uri)) {
uri += i++;
}
return uri;
}
When running the test, the URI grows to become something like this:
When i=50,
"www.apache.org/jackrabbit/test/namespaceImportTest01234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950"
Here is the proposed fix:
protected String getUnusedURI() throws RepositoryException {
Set uris = new HashSet(Arrays.asList(nsp.getURIs()));
String uri = TEST_URI;
int i = 0;
while (uris.contains(uri)) {
uri = TEST_URI + i++;
}
return uri;
}
When i=50,
"www.apache.org/jackrabbit/test/namespaceImportTest50"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (JCR-262) In AbstractImportXmlTest, a bug in getUnusedUri() causes URI length to grow too quickly, causing test to fail when using ORM-PM
Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-262?page=all ]
Marcel Reutegger closed JCR-262:
--------------------------------
Fix Version: 1.0
Resolution: Fixed
Changed as suggested.
Thanks for the suggestion.
svn revision: 328816
> In AbstractImportXmlTest, a bug in getUnusedUri() causes URI length to grow too quickly, causing test to fail when using ORM-PM
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: JCR-262
> URL: http://issues.apache.org/jira/browse/JCR-262
> Project: Jackrabbit
> Type: Test
> Components: API
> Versions: 1.0
> Reporter: Joseph Chen
> Priority: Minor
> Fix For: 1.0
>
> Test fails when using ORM-PM because the URI exceeds the column size in the database.
> Here is the current implementation:
> protected String getUnusedURI() throws RepositoryException {
> Set uris = new HashSet(Arrays.asList(nsp.getURIs()));
> String uri = TEST_URI;
> int i = 0;
> while (uris.contains(uri)) {
> uri += i++;
> }
> return uri;
> }
> When running the test, the URI grows to become something like this:
> When i=50,
> "www.apache.org/jackrabbit/test/namespaceImportTest01234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950"
> Here is the proposed fix:
> protected String getUnusedURI() throws RepositoryException {
> Set uris = new HashSet(Arrays.asList(nsp.getURIs()));
> String uri = TEST_URI;
> int i = 0;
> while (uris.contains(uri)) {
> uri = TEST_URI + i++;
> }
> return uri;
> }
> When i=50,
> "www.apache.org/jackrabbit/test/namespaceImportTest50"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira