Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16292

InvitationTest#testDeclineInvitation is flickering

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A
    • org.xwiki.test.ui.invitation.InvitationTest#testDeclineInvitation

    Description

      InvitationTest#testDeclineInvitation is flickering with the following stack trace:

      org.openqa.selenium.NoSuchElementException: 
      Timed out after 10 seconds. Unable to locate the element
      For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
      Build info: version: '2.44.0', revision: '76d78cf323ce037c5f92db6c1bba601c2ac43ad8', time: '2014-10-23 13:11:40'
      System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.40-vs2.3.6.8-beng', java.version: '1.8.0_121'
      Driver info: driver.version: XWikiWebDriver
      	at org.openqa.selenium.support.pagefactory.AjaxElementLocator.findElement(AjaxElementLocator.java:72)
      	at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:37)
      	at com.sun.proxy.$Proxy41.findElements(Unknown Source)
      	at org.xwiki.test.ui.XWikiWebDriver.findElementsWithoutWaiting(XWikiWebDriver.java:143)
      	at org.xwiki.invitation.test.po.InvitationFooterElement.spamReports(InvitationFooterElement.java:78)
      	at org.xwiki.test.ui.invitation.InvitationTest.testDeclineInvitation(InvitationTest.java:430)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      

      The screenshot of the failure only shows a login page.
      After looking on the test implementation it seems that the test manipulate sessions:

      // Switch to admin
      getUtil().setSession(admin);
      // Go to invitation sender.
      setSenderPage(InvitationSenderPage.gotoPage());
      // it fails here
      Assert.assertTrue("Declined invitation is still listed as pending in the footer.",
          getSenderPage().getFooter().spamReports() == 0);
      

      and that in some conditions it might be considered as tampered cookies, according to the logs of the failing tests:

      23:21:06.381 [main] INFO  org.xwiki.test.ui.TestDebugger - InvitationTest-testDeclineInvitation started
      23:21:19.343 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 23:21:19,334 [http://localhost:8080/xwiki/bin/get/Invitation/InvitationGuestActions?outputSyntax=plain&sheet=XWiki.DocumentTree&showAttachments=false&showTranslations=false&exclusions=document%3Axwiki%3AwxIBhi.WebHome&exclusions=document%3Axwiki%3ASandbox.WebHome&exclusions=document%3Axwiki%3AKhlDef.WebHome&exclusions=document%3Axwiki%3AHelp.WebHome&exclusions=document%3Axwiki%3AyCkEFf.WebHome&exclusions=document%3Axwiki%3AcdjSCO.WebHome&exclusions=document%3Axwiki%3AMenu.WebHome&exclusions=document%3Axwiki%3AXWiki.WebHome&exclusions=document%3Axwiki%3AApplicationsPanelEntryTest.WebHome&exclusions=document%3Axwiki%3ALiveTableEditorTest.WebHome&exclusions=document%3Axwiki%3AAddEntryTest.WebHome&exclusions=document%3Axwiki%3AYtTNAT.WebHome&data=path&id=document%3Axwiki%3AInvitation.InvitationGuestActions] WARN  u.i.x.MyPersistentLoginManager - Login cookie validation hash mismatch! Cookies have been tampered with 
      23:21:19.386 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 23:21:19,386 [http://localhost:8080/xwiki/bin/view/Invitation/WebHome] WARN  u.i.x.MyPersistentLoginManager - Login cookie validation hash mismatch! Cookies have been tampered with 
      23:21:29.840 [main] INFO  org.xwiki.test.ui.TestDebugger - InvitationTest-testDeclineInvitation failed
      

      Link to the failing test: https://ci.xwiki.org/job/XWiki/job/xwiki-platform/job/master/1614/testReport/org.xwiki.test.ui.invitation/InvitationTest/Platform_Builds___main___flavor_test_ui___Build_for_Flavor_Test___UI___testDeclineInvitation/

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            surli Simon Urli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: