Bug 724524 (BRMS-470)

Summary: Modeshape FileSytemConnector unit tests are failing (maximum absolute path length (255) was exceeded)
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Petr Široký <psiroky>
Component: ModeshapeAssignee: Van Halbert <vhalbert>
Status: ASSIGNED --- QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: 5.1.0.ER4CC: lpetrovi, rhauch, vhalbert
Target Milestone: ---Keywords: Reopened
Target Release: 5.1.0.CR1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/BRMS-470
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
brms standalone 5.1.0 ER4
Last Closed: 2011-04-12 13:30:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Maven surefire report. none

Description Petr Široký 2010-11-29 12:50:37 UTC
securitylevel_name: Public

Same as MODE-1024 except tests was run on Sun JDK 1.6.

See http://hudson.qa.jboss.com/hudson/view/BRMS/job/brms-modeshape-db/DATABASE=postgresql83,jdk=java16_default/9/

The tests are failing with postregresql, mysql and db2. If mssql (2003 or 2008) is used the tests are not failing.

Comment 1 Petr Široký 2010-11-30 09:33:09 UTC
Link: Added: This issue is related to MODE-1024


Comment 2 Van Halbert 2010-12-06 14:14:19 UTC
Release Notes Text: Added: ModeShape applied the fix to the 2.2.x product branch and should be in the next release.


Comment 3 Petr Široký 2010-12-21 12:58:08 UTC
I just ran the tests with modeshape '2.2.x' r2625 and these tests are still failing. DB2 9.7 was used as database.

Comment 4 Van Halbert 2011-04-12 13:28:33 UTC
Need to check the configuration, because the FileSystemConnector cannot be used for sequencing, its only for file check in storage.

Also, there is already a DB2 jira for this issue.    This issue is specific to the FileSystemConnector, and should be able to be validated without using DB2.

Comment 5 Van Halbert 2011-04-12 13:30:36 UTC
The fix for the FilSystemConnector was committed and should be tested separately from using a database that is currently having issues (i.e.,  DB2).

Comment 6 Petr Široký 2011-08-19 11:49:34 UTC
I am seeing this again in 5.2.0 ER2 with ModeShape 2.5.1.

Comment 8 Van Halbert 2011-08-19 18:19:36 UTC
What's strange about this is the modeshape-2.5.x-nightly-integration hudson job is run on:  dsp07-rhel5-x86_64
and it isn't seeing the max length error.    There's also other modeshape related jobs are running (i.e., on suse) and not seeing this issue.    And I'm not sure what's different about your environment.

Comment 9 Van Halbert 2011-08-25 19:33:29 UTC
There is a default maxPathLength of 255, to meet the smallest maximum which for windows.   To override the default, add the property: mode:maxPathLength="<integer>" to the mode:source defined for the FileSystemSource.

Comment 10 Van Halbert 2011-08-26 13:01:04 UTC
ModeShape committed fix to 2.5.x branch,  COMMIT ID:  5284a3be83269587de1c
This just missed the ER3 build.

Comment 11 Petr Široký 2011-09-23 15:37:30 UTC
Setting the 'maxPathLength' property works. However the failing unit tests are creating repositories in java code, so the tests would have to be updated. Isn't there a way to set the max length automatically? Let's say 255 if we are running on windows and higher number on systems without this restriction?

Comment 12 Randall Hauch 2011-09-23 15:50:05 UTC
Which tests are failing? Can you attach the JUnit text report?

Comment 13 Petr Široký 2011-09-26 07:18:40 UTC
Created attachment 524844 [details]
Maven surefire report.

If I create path with length 255 or more, place ModeShape sources there and run unit tests, multiple (5) test methods are failing in these classes:
    org.modeshape.connector.filesystem.FileSystemConnectorWithIgnorePropertiesWritableTest.shouldBeAbleToCreateDeepPath
    org.modeshape.connector.filesystem.FileSystemConnectorWithLogPropertiesWritableTest.shouldBeAbleToCreateDeepPath
    org.modeshape.connector.filesystem.FileSystemConnectorWithStorePropertiesWritableTest.shouldBeAbleToCreateDeepPath
    org.modeshape.connector.filesystem.FileSystemConnectorWithThrowPropertiesWritableTest.shouldBeAbleToCreateDeepPath
    org.modeshape.connector.filesystem.FileSystemConnectorWritableTest.shouldBeAbleToCreateDeepPath

Surefire report attached (actual master branch, but it is happening in 2.5.x too).

If I set the max path length to higher number (for example 500) when creating repositories (this means editing the test classes), the errors are gone. However this won't probably work on Windows (not tested yet) since the max path length is limited to 255.