Gradle
  1. Gradle
  2. GRADLE-2223

1.0-rc1 breaks GWT unit test framework

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0-rc-1
    • Fix Version/s: 1.0-rc-2

      Description

      The RC1 release of gradle, with its change to the test classpath, has broken the GWT unit test framework. Deep inside the GWT framework, it uses the URLClassloader when searching for resources and classes for testing. In the RC1 release notes, it suggests to check the classpath in the manifest of the jar it generates, but this cannot be easily done without rewriting large parts of the GWT test framework. I imaging this change could cause various problems in other frameworks as well, as it is a bit non-standard.

      Perhaps an alternative to the current jar manifest approach would be to copy the jars to a directory, and then use a wildcard for the classpath (e.g. java -cp mydir/*)? This would only work with JDK 1.6 however. How does Ant handle this problem?

        Activity

        Hide
        Adam Murdoch
        added a comment -

        Do you have a stack trace for the test failures?

        Show
        Adam Murdoch
        added a comment - Do you have a stack trace for the test failures?
        Hide
        Bryan
        added a comment -

        I've attached one of the stack traces. Basically a class isn't found which eventually leads to an NPE.

        Show
        Bryan
        added a comment - I've attached one of the stack traces. Basically a class isn't found which eventually leads to an NPE.
        Hide
        Bryan Keller
        added a comment -

        Perhaps this new behavior could be made optional, so non-Windows platforms that don't have the command line length limit won't be affected

        Show
        Bryan Keller
        added a comment - Perhaps this new behavior could be made optional, so non-Windows platforms that don't have the command line length limit won't be affected
        Hide
        Adam Murdoch
        added a comment -

        Could you try out the fix, and let us know how you go: http://gradle.org/release-candidate

        Show
        Adam Murdoch
        added a comment - Could you try out the fix, and let us know how you go: http://gradle.org/release-candidate
        Hide
        Bryan Keller
        added a comment -

        The fix works. I tried out the RC2 nightly and my GWT tests are running again.

        Show
        Bryan Keller
        added a comment - The fix works. I tried out the RC2 nightly and my GWT tests are running again.

          People

          • Assignee:
            Unassigned
            Reporter:
            Bryan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: