Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9774

Rework gradle build to use modern conventions - test remediation

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-2
    • None
    • None

    Description

      The various build scripts and associated artifacts have been written by numerous folks targeting numerous versions of Gradle over many years. The styles have drifted apart and some places use very old conventions/style. We should consolidate/update as needed.

      Cloned to track some differences in test results. We aren't necessarily attempting to get like for like - perhaps some tests weren't running correctly previously - we should at least understand differences.

      These are sporadic - e.g. aren't happening on the CI server right now. We are changing global config for grapes, e.g.
      https://github.com/apache/groovy/blob/master/src/test/groovy/grape/GrapeIvyTest.groovy#L298
      Perhaps we need to isolate that test better.

      Some Grape tests (package groovy.grape) run differently. Old:

      New (testAutoDownloadGrapeConfig was split in three to better isolate the failure):

      Related failure in groovy.bugs.Groovy8060Bug. Old:

      New:

      With stacktrace (shown for Windows):

      BUG! exception in phase 'conversion' in source unit 'TestScript10.groovy' null
      ...
      at groovy.bugs.Groovy8060Bug.testLoggingWithinClosuresThatAreMethodArgsShouldHaveGuards(Groovy8060Bug.groovy:25)
      ...
      Caused by: java.nio.file.NoSuchFileException: D:\projects\groovy\build\tmp\test\grape\grapes\org.slf4j\slf4j-simple\jars\slf4j-simple-1.7.25.jar
      ...
      at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:264)
      

      Jar does appear to be there after the build and test passes in isolation.

      The groovy.bugs.Groovy6932Bug test class also fails sporadically but runs in isolation:

      General error during conversion: Error grabbing Grapes -- [download failed: org.slf4j#slf4j-simple;1.7.25!slf4j-simple.jar]
      ...
      at groovy.bugs.Groovy6932Bug.testLoggingWithinClosuresShouldHaveGuards(Groovy6932Bug.groovy:25)
      

      The groovy.grape.GrapeClassLoaderTest test class also fails sporadically but runs in isolation:

      java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: com.jidesoft#jide-oss;[2.2.1,2.3): not found]]
      at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:455)
      ...
      at groovy.grape.GrapeClassLoaderTest.downloadToCache(GrapeClassLoaderTest.groovy:29)
      

      The following is also different:

      but was:

      This change was intentional. A @Ignore was added. Just noting it here while we confirm we are happy with the implications.

      The Spec tests are also not being run (~480 tests). Nor can they be run individually, e.g. two examples below:

      > No tests found for given includes: [CommandChainsTest](--tests filter)
      > No tests found for given includes: [typing.OptionalTypingTest](--tests filter)
      

      Yet, org.apache.groovy-tested.gradle does seem to be invoked for the root and all sub-projects.

      Attachments

        1. screenshot-6.png
          88 kB
          Paul King
        2. screenshot-5.png
          78 kB
          Paul King
        3. screenshot-4.png
          12 kB
          Paul King
        4. screenshot-3.png
          11 kB
          Paul King
        5. screenshot-2.png
          41 kB
          Paul King
        6. screenshot-1.png
          29 kB
          Paul King

        Issue Links

          Activity

            People

              melix Cédric Champeau
              paulk Paul King
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: