Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-73247

Adapt Git plugin for Jetty 12 (EE 9) or remove Mockito usages from GitStatusTest

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None

      When a Jetty 12 EE 9 core (i.e., one built from the jakarta branch of jenkins) and Jetty 12 EE 9 compatible test harness (i.e., one built from the forward branch of jenkins-test-harness) are used, the following test fails:

      • hudson.plugins.git.GitStatusTest

      One solution is e.g. https://github.com/jenkinsci/git-plugin/pull/1589 to migrate to using Mockito with Jetty 12 EE 9. Unfortunately, that approach is not backward compatible with Jetty 10 or Jetty 12 EE 8, so the PR will have to remain in draft until we release Jetty 12 EE 9 support. Still, we should prepare the PR in advance.

      Alternatively, it would be more desirable if this test could instead stop using Mockito as in https://github.com/jenkinsci/view-job-filters-plugin/pull/58 and https://github.com/jenkinsci/configuration-as-code-plugin/pull/2494. That change could be prepared and released in advance without updating this plugin's core baseline.

          [JENKINS-73247] Adapt Git plugin for Jetty 12 (EE 9) or remove Mockito usages from GitStatusTest

          Mark Waite added a comment -

          The master branch of the git plugin now includes fixes for GitStatusTest to remove the dependency on StaplerException. The tests were moved to GitStepTest and implemented using JenkinsRule.

          Unfortunately, there is a new failure in the git plugin tests that is unrelated to Jetty 12 EE 8 or Jetty 12 EE 9 but may disrupt the Jetty 12 EE 8 and Jetty 12 EE 9 upgrade as well as disrupting the use of the Jenkins plugin bill of materials with Jenkins 2.462.1. I've submitted JENKINS-73568 and asked for some help to resolve it. I hope to have it resolved on the master branch of the git plugin before the release of Jenkins 2.462.1 so that git plugin 5.3 can be released with the test fixes needed for this issue.

          Mark Waite added a comment - The master branch of the git plugin now includes fixes for GitStatusTest to remove the dependency on StaplerException. The tests were moved to GitStepTest and implemented using JenkinsRule. Unfortunately, there is a new failure in the git plugin tests that is unrelated to Jetty 12 EE 8 or Jetty 12 EE 9 but may disrupt the Jetty 12 EE 8 and Jetty 12 EE 9 upgrade as well as disrupting the use of the Jenkins plugin bill of materials with Jenkins 2.462.1. I've submitted JENKINS-73568 and asked for some help to resolve it. I hope to have it resolved on the master branch of the git plugin before the release of Jenkins 2.462.1 so that git plugin 5.3 can be released with the test fixes needed for this issue.

          Mark Waite added a comment - - edited

          Mock usages have been replaced for those cases that used Jetty 12 EE 8

          Unrelated test failures are resolved.

          Mark Waite added a comment - - edited Mock usages have been replaced for those cases that used Jetty 12 EE 8 Unrelated test failures are resolved.

          Basil Crow added a comment -

          Confirming that the latest EE 9 tests in jenkinsci/bom are passing with the 5.3.0 release of the Git plugin.

          Basil Crow added a comment - Confirming that the latest EE 9 tests in jenkinsci/bom are passing with the 5.3.0 release of the Git plugin.

            markewaite Mark Waite
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: