Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-574

UT failure on Windows: utils.io.Java7SupportTest createAndReadSymlink

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: maven-shared-utils-3.0.1, maven-shared-utils-3.1.0
    • Fix Version/s: maven-shared-utils-3.2.0
    • Component/s: maven-shared-utils
    • Labels:
      None

      Issue Links

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/maven-shared/pull/16

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/maven-shared/pull/16
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-shared #3723 (See https://builds.apache.org/job/maven-shared/3723/)
        MSHARED-574 UT failure on Windows: utils.io.Java7SupportTest createAndReadSymlink

        Disable #createAndReadSymlink() for all Windows. Eventhough Windows Vista+ suppor Symlinks, we need elevated rights which we cannot obtain at runtime. Disable for now on Windows in general.

        It might be better to catch the exception on Windows...

        This closes #16 (michaelo: http://svn.apache.org/viewvc/?view=rev&rev=1792170)

        • (edit) maven-shared-utils/src/test/java/org/apache/maven/shared/utils/io/Java7SupportTest.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-shared #3723 (See https://builds.apache.org/job/maven-shared/3723/ ) MSHARED-574 UT failure on Windows: utils.io.Java7SupportTest createAndReadSymlink Disable #createAndReadSymlink() for all Windows. Eventhough Windows Vista+ suppor Symlinks, we need elevated rights which we cannot obtain at runtime. Disable for now on Windows in general. It might be better to catch the exception on Windows... This closes #16 (michaelo: http://svn.apache.org/viewvc/?view=rev&rev=1792170 ) (edit) maven-shared-utils/src/test/java/org/apache/maven/shared/utils/io/Java7SupportTest.java
        Hide
        michael-o Michael Osipov added a comment -

        Fixed with r1792170.

        Show
        michael-o Michael Osipov added a comment - Fixed with r1792170 .
        Hide
        belingueres Gabriel Belingueres added a comment -

        Replaced patch with the following PR: https://github.com/apache/maven-shared/pull/16

        Show
        belingueres Gabriel Belingueres added a comment - Replaced patch with the following PR: https://github.com/apache/maven-shared/pull/16
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user belingueres opened a pull request:

        https://github.com/apache/maven-shared/pull/16

        Fix MSHARED-574 : UT failure on Windows: utils.io.Java7SupportTest create…

        Fix MSHARED-574

        Added class TestPrivilegesUtil to assert if tests are running with privileges.

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

        $ git pull https://github.com/belingueres/maven-shared MSHARED-574

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

        https://github.com/apache/maven-shared/pull/16.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 #16


        commit 35dbef94bfd8b8318cff160409c9d4929de7c8b9
        Author: belingueres <belingueres@gmail.com>
        Date: 2016-08-14T20:44:11Z

        MSHARED-574 : UT failure on Windows: utils.io.Java7SupportTest createAndReadSymlink

        Added class TestPrivilegesUtil to assert if tests are running with privileges.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user belingueres opened a pull request: https://github.com/apache/maven-shared/pull/16 Fix MSHARED-574 : UT failure on Windows: utils.io.Java7SupportTest create… Fix MSHARED-574 Added class TestPrivilegesUtil to assert if tests are running with privileges. You can merge this pull request into a Git repository by running: $ git pull https://github.com/belingueres/maven-shared MSHARED-574 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven-shared/pull/16.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 #16 commit 35dbef94bfd8b8318cff160409c9d4929de7c8b9 Author: belingueres <belingueres@gmail.com> Date: 2016-08-14T20:44:11Z MSHARED-574 : UT failure on Windows: utils.io.Java7SupportTest createAndReadSymlink Added class TestPrivilegesUtil to assert if tests are running with privileges.
        Hide
        belingueres Gabriel Belingueres added a comment -

        Hi!
        For what I've been finding, symlinking needs privileged access in Windows, and once the JVM is running is not possible to elevate privileges "on demand", that means you must open CMD as Administrator to execute a 'mvn test'.
        The attached patch adds an assert method that checks if running with elevated privileges and fail with a "more friendly" message (Tested on Windows only).

        Regards,
        Gabriel

        Show
        belingueres Gabriel Belingueres added a comment - Hi! For what I've been finding, symlinking needs privileged access in Windows, and once the JVM is running is not possible to elevate privileges "on demand", that means you must open CMD as Administrator to execute a 'mvn test'. The attached patch adds an assert method that checks if running with elevated privileges and fail with a "more friendly" message (Tested on Windows only). Regards, Gabriel

          People

          • Assignee:
            michael-o Michael Osipov
            Reporter:
            hboutemy Hervé Boutemy
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development