You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Richard M Feezel (JIRA)" <ji...@apache.org> on 2010/08/14 21:02:16 UTC

[jira] Created: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Numerous JUnit tests failing on Windows.
----------------------------------------

                 Key: DIRSERVER-1541
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: core, ldap, schema
    Affects Versions: 2.0.0-RC1
         Environment: All Microsoft Windows.
            Reporter: Richard M Feezel
            Priority: Minor
             Fix For: 2.0.0-RC1


File names and paths are not being handled in a platform-independent manner is all cases.

In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.

Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.

Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.


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


[jira] Assigned: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny reassigned DIRSERVER-1541:
--------------------------------------------

    Assignee: Emmanuel Lecharny

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Updated: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Richard M Feezel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard M Feezel updated DIRSERVER-1541:
----------------------------------------

    Attachment: WindowsPatches.diff

I tested these patches on Windows XP SP3 by pulling the current sources from Subverion about an hour ago, then applying these patches and running a clean install and test.  All tests passed without complaint.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909447#action_12909447 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

Added and activated the Windows CI builds on hudson: 
  https://hudson.apache.org/hudson/view/Directory/job/dir-shared-jdk16-win 
  https://hudson.apache.org/hudson/view/Directory/job/dir-apacheds-jdk16-win 
The GSSAPI bind test is also failing there, but it's the only one. 

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908659#action_12908659 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

Good point Emmanuel, but according to the Javadoc a new Matcher is returned. However the modifications in UtcTimeSyntaxChecker and GeneralizedTimeSyntaxChecker are not related to this issues, but general optimizations. It would be better to create a separate Jira for that and to discuss the patch there.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908989#action_12908989 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

I checked the Javadoc at http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html and I don't see a thread safety problem here. The Pattern instance itself is thread safe, including the creation of the Matcher. And as a new Matcher is created every time there should be no problem. Thoughts?


> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Richard M Feezel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909276#action_12909276 ] 

Richard M Feezel commented on DIRSERVER-1541:
---------------------------------------------

Testing on Win7 64-bit with Sun jdk 1.6.0_21 completed successfully except for " testSaslGssapiBind(org.apache.directory.server.kerberos.kdc.SaslGssapiBindITest)" due to "Server not found".  This is probably due to the absence of a working DNS in the test environment and is unrelated to this Issue.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Updated: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Richard M Feezel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard M Feezel updated DIRSERVER-1541:
----------------------------------------

    Attachment: ADS_Patches.diff.txt

Suggested patches to address the described issues.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


Re: [jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by fe...@gdls.com.
I run the tests using "mvn test -Dintegration" at a command prompt.

"Stefan Seelmann (JIRA)" <ji...@apache.org> wrote on 09/13/2010 01:55:34 
AM:

> 
>     [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.
> atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel&focusedCommentId=12908628#action_12908628 ] 
> 
> Stefan Seelmann commented on DIRSERVER-1541:
> --------------------------------------------
> 
> i'm using Sun JDK 1.6.0_20.
> 
> Did you run the tests from within Eclipse (either as JUnit tests or 
> with m2eclipse maven plugin) or from command line? I ask because I 
> found out that the behaviour is different in each case. If I run 
> "mvn clean install" from command line the schema is extracted from 
> the JARs that were deployed to the local maven repo. However if I 
> run the tests from within Eclipse as JUnit tests then the projects 
> in the workspace are referenced directly, so the schema is extracted
> from the target/classes directory.
> 
> 
> > Numerous JUnit tests failing on Windows.
> > ----------------------------------------
> >
> >                 Key: DIRSERVER-1541
> >                 URL: 
https://issues.apache.org/jira/browse/DIRSERVER-1541
> >             Project: Directory ApacheDS
> >          Issue Type: Bug
> >          Components: core, ldap, schema
> >    Affects Versions: 2.0.0-RC1
> >         Environment: All Microsoft Windows.
> >            Reporter: Richard M Feezel
> >            Assignee: Emmanuel Lecharny
> >            Priority: Minor
> >             Fix For: 2.0.0-RC1
> >
> >         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
> >
> >
> > File names and paths are not being handled in a platform-
> independent manner is all cases.
> > In particular, in regex matching patterns the "\" has special 
> meaning.  On Windows the "\" is used as the file directory separator
> character so a regex attempting to test for a directory separator 
> character must be constructed in a platform-dependent manner.
> > Also, certain characters are not allowed in file names in 
> Microsoft Windows.  Any attempt to use such names must have these 
> special characters "escaped" to safe characters.  Since the "\" 
> character is the directory separator character it is unsuitable for 
> special character escaping.
> > Finally, in the JdbmStoreTest test, stores and indexes must be 
> destroyed and/or closed to permit deletion of the underlying files 
> at completion of the test run.
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 



This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information.  No one else may read, print, store, copy, forward or act in reliance on it or its attachments.  If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908628#action_12908628 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

i'm using Sun JDK 1.6.0_20.

Did you run the tests from within Eclipse (either as JUnit tests or with m2eclipse maven plugin) or from command line? I ask because I found out that the behaviour is different in each case. If I run "mvn clean install" from command line the schema is extracted from the JARs that were deployed to the local maven repo. However if I run the tests from within Eclipse as JUnit tests then the projects in the workspace are referenced directly, so the schema is extracted from the target/classes directory.


> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912701#action_12912701 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

Fixed remaining GSSAPI bind tests, they now work on Hudson (Windows 2008 server) and my Windows 7 VM:
  http://svn.apache.org/viewvc?rev=998799&view=rev
  http://svn.apache.org/viewvc?rev=999045&view=rev

Richard, can you test again if they also work for you?

There are still sporadic failures, but they are not specific to Windows, I added DIRAPI-30 to track that.


> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Richard M Feezel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908586#action_12908586 ] 

Richard M Feezel commented on DIRSERVER-1541:
---------------------------------------------

Stefan,

You are probably correct that there will be problems with Jar files.  I believe paths as expressed within Jar files are platform independent while the file system path of the Jar file itself will be platform dependent.  This means that the pattern passed to "ResourceMap" needs to be platform independent and ResourceMap should internally deal with platform specific issues.  I'll look into this tomorrow some time.  I'm still very new to the project and my understanding of the existing code is obviously limited.

I'm actually surprise my patch works in XP 32-bit with the Sun JDK.  What JDK were you testing on the Win7 64-bit?

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Resolved: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seelmann resolved DIRSERVER-1541.
----------------------------------------

    Resolution: Fixed

Fixed

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Richard M Feezel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909227#action_12909227 ] 

Richard M Feezel commented on DIRSERVER-1541:
---------------------------------------------

Testing of DIRSERVER-1541.patch on a fresh checkout from Subversion completed successfully on Windows-XP SP-3.

I'm attempting to build a Windows-7 system on which to test.  More on this later if I'm successful.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908637#action_12908637 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

Regarding your modification in ClientSearchRequestTest: There was a problem with a unicode character in the Java sources, I replaced it with the unicode notation (http://svn.apache.org/viewvc?rev=996427&view=rev). The test should work on windows now.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "feezelr@gdls.com (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909176#action_12909176 ] 

feezelr@gdls.com commented on DIRSERVER-1541:
---------------------------------------------

That is my understanding as well, and the basis for the structure of the 
changes which I made.

"Stefan Seelmann (JIRA)" <ji...@apache.org> wrote on 09/13/2010 04:36:41 

https://issues.apache.org/jira/browse/DIRSERVER-1541



This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information.  No one else may read, print, store, copy, forward or act in reliance on it or its attachments.  If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.



> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908563#action_12908563 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

Thanks Richard for the patch.

I tested it on Windows 7(64 bit) and the build fails. I think the problem is the modification in JarLdifSchemaLoader because on windows the path separator is the backslash, however when loading the schema from a JAR I think the forward slash is requried.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908997#action_12908997 ] 

Emmanuel Lecharny commented on DIRSERVER-1541:
----------------------------------------------

np then.

I would just suggest that patches are focusing on fixing the issue, and don't mix with other proposed fixes. If needed, a new JIRA would be better.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Updated: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seelmann updated DIRSERVER-1541:
---------------------------------------

    Attachment: DIRSERVER-1541.patch

Here is a modified version of the patch that works for me. Richard, can you please test if it also works on your WinXP?

The modifications:
In JarLdifSchemaLoader, LdifConfigExtractor´, and DefaultSchemaLdifExtractor I use the pattern "[/\\Q\\\\E]" instead of File.separator. In LdifPartition I kept the encoding of  '+' and ' ' (space) characters and modified the tests in LdifPartitionTest. I also added a new test in LdifPartitonTest. Changes in DefaultSchemaManager, UtcTimeSyntaxChecker, and GeneralizedTypeSyntaxChecker are already committed.


> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908650#action_12908650 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

I think I found a solution. Instead of using File.separator as pattern I use "[/\\Q\\\\E]" which matches both, forward slash and backslash.


> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908654#action_12908654 ] 

Emmanuel Lecharny commented on DIRSERVER-1541:
----------------------------------------------

I have a concern about this modification in the latest patch :

-    // The regexp pattern matcher
-    private Pattern datePattern = Pattern.compile( GENERALIZED_TIME_PATTERN ); 
+    // The regexp pattern is immutable, only one instance needed.
+    private static final Pattern DATE_PATTERN = Pattern.compile( GENERALIZED_TIME_PATTERN ); 
 
     /**
      * Creates a new instance of GeneralizedTimeSyntaxChecker.
@@ -134,7 +134,7 @@
         }
         
         // Start the date parsing
-        boolean result = datePattern.matcher( strValue ).find();
+        boolean result = DATE_PATTERN.matcher( strValue ).find();


I'm not sure that DATE_PATTERN.matcher is thread-safe. Can this be checked ? 

(the problem is not the Pattern itself, but the fact that it returns a Matcher which is not thread safe when calling the matcher() method on the Pattern).

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard M Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909404#action_12909404 ] 

Stefan Seelmann commented on DIRSERVER-1541:
--------------------------------------------

I got the same failing test on Windows 7, even an entry "127.0.0.1 localhost" didn't help.

Anyway, I committed the patch, thanks for contributing and testing :-)
  http://svn.apache.org/viewvc?rev=997052&view=rev


> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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


[jira] Commented: (DIRSERVER-1541) Numerous JUnit tests failing on Windows.

Posted by "Richard Feezel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913356#action_12913356 ] 

Richard Feezel commented on DIRSERVER-1541:
-------------------------------------------

Sorry for the slow response.  A fresh checkout from Subversion this afternoon (US-Eastern time) builds and tests without issue on both XP-SP3 and Win7.  A couple of tests seem to display some debug data but they passed.

> Numerous JUnit tests failing on Windows.
> ----------------------------------------
>
>                 Key: DIRSERVER-1541
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1541
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core, ldap, schema
>    Affects Versions: 2.0.0-RC1
>         Environment: All Microsoft Windows.
>            Reporter: Richard Feezel
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: ADS_Patches.diff.txt, DIRSERVER-1541.patch, WindowsPatches.diff
>
>
> File names and paths are not being handled in a platform-independent manner is all cases.
> In particular, in regex matching patterns the "\" has special meaning.  On Windows the "\" is used as the file directory separator character so a regex attempting to test for a directory separator character must be constructed in a platform-dependent manner.
> Also, certain characters are not allowed in file names in Microsoft Windows.  Any attempt to use such names must have these special characters "escaped" to safe characters.  Since the "\" character is the directory separator character it is unsuitable for special character escaping.
> Finally, in the JdbmStoreTest test, stores and indexes must be destroyed and/or closed to permit deletion of the underlying files at completion of the test run.

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