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

Flaky ConfigurablePageObject.save() sometimes still on /configSubmit

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When using Folder PageObject, I can see sometimes the save() failing, for example by doing:

      import org.jenkinsci.test.acceptance.po.Folder;
      import org.jenkinsci.test.acceptance.po.Jenkins;
      ...
      Folder folderInController = jenkins.jobs.create(Folder.class, "ControllerFolder");
      folderInController.save();
      

      The expect driver url should ends with /job/ControllerFolder/, but is sometimes ending with /job/ControllerFolder/configSubmit and failing.

        Attachments

          Issue Links

            Activity

            ajard A. Jard created issue -
            teilo James Nord made changes -
            Field Original Value New Value
            Assignee Oliver Gond┼ża [ olivergondza ]
            Hide
            teilo James Nord added a comment -

            we are waiting for the current `save` button to become stale, and if Jenkins is slow enough and maven tests are quick enough that will happen as soon as we get the response from Jenkins.
            in this case it is a 302 redirect so we really need a way to know either what the submit endpoint is (so we keep waiting as long as that is the driver.currenturl) or the expected endpoint so we know to wait until the driver.currenturl is the expected page.

            the first would have some issues when saving a form ends up with the same URL as the form submission (by using some form of view in the Jenkins / plugin code).

            Show
            teilo James Nord added a comment - we are waiting for the current `save` button to become stale, and if Jenkins is slow enough and maven tests are quick enough that will happen as soon as we get the response from Jenkins. in this case it is a 302 redirect so we really need a way to know either what the submit endpoint is (so we keep waiting as long as that is the driver.currenturl) or the expected endpoint so we know to wait until the driver.currenturl is the expected page. the first would have some issues when saving a form ends up with the same URL as the form submission (by using some form of view in the Jenkins / plugin code).
            drulli Ulli Hafner made changes -
            Priority Minor [ 4 ] Blocker [ 1 ]
            Hide
            drulli Ulli Hafner added a comment -

            The line

            waitFor(e).until(CapybaraPortingLayerImpl::isStale);
            

            breaks my UI tests for Jenkins 2.263.x (it works with Jenkins 2.249.x):

            Show
            drulli Ulli Hafner added a comment - The line waitFor(e).until(CapybaraPortingLayerImpl::isStale); breaks my UI tests for Jenkins 2.263.x (it works with Jenkins 2.249.x): https://github.com/jenkinsci/warnings-ng-plugin/pull/758 https://github.com/jenkinsci/git-forensics-plugin/pull/210
            drulli Ulli Hafner made changes -
            Remote Link This issue links to "PR #633 (Web Link)" [ 26475 ]
            drulli Ulli Hafner made changes -
            Priority Blocker [ 1 ] Major [ 3 ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ajard A. Jard
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: