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

org.xwiki.test.ui.LanguageTest @AfterClass method is flickering

    XMLWordPrintable

Details

    • Integration
    • Unknown
    • N/A
    • N/A
    • org.xwiki.test.ui.LanguageTest

    Description

      Error Message

      Expected condition failed: waiting for org.xwiki.test.ui.XWikiWebDriver$$Lambda$442/1661803311@67a05eff (tried for 10 second(s) with 500 milliseconds interval)
      

      Stacktrace

      org.openqa.selenium.TimeoutException: Expected condition failed: waiting for org.xwiki.test.ui.XWikiWebDriver$$Lambda$442/1661803311@67a05eff (tried for 10 second(s) with 500 milliseconds interval)
      	at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:95)
      	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)
      	at org.xwiki.test.ui.XWikiWebDriver.waitUntilCondition(XWikiWebDriver.java:228)
      	at org.xwiki.administration.test.po.AdministrationMenu.waitUntilReady(AdministrationMenu.java:163)
      	at org.xwiki.administration.test.po.AdministrationMenu.<init>(AdministrationMenu.java:50)
      	at org.xwiki.administration.test.po.AdministrationPage.<init>(AdministrationPage.java:34)
      	at org.xwiki.administration.test.po.AdministrationPage.gotoPage(AdministrationPage.java:39)
      	at org.xwiki.test.ui.LanguageTest.setLanguageSettings(LanguageTest.java:180)
      	at org.xwiki.test.ui.LanguageTest.setLanguageSettings(LanguageTest.java:174)
      	at org.xwiki.test.ui.LanguageTest.reset(LanguageTest.java:72)
      	at org.xwiki.test.ui.LanguageTest.afterClass(LanguageTest.java:57)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
      	at org.xwiki.test.integration.junit4.ValidateConsoleRule$ValidateConsoleStatement.evaluate(ValidateConsoleRule.java:73)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.junit.runners.Suite.runChild(Suite.java:128)
      	at org.junit.runners.Suite.runChild(Suite.java:27)
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.junit.extensions.cpsuite.ClasspathSuite.run(ClasspathSuite.java:194)
      	at org.xwiki.test.integration.XWikiExecutorSuite.run(XWikiExecutorSuite.java:195)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
      	at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:43)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:82)
      	at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:73)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      Caused by: org.openqa.selenium.NoSuchElementException: Timed out after 10 seconds. Unable to locate the element
      	at org.openqa.selenium.support.pagefactory.AjaxElementLocator.findElement(AjaxElementLocator.java:99)
      	at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
      	at com.sun.proxy.$Proxy44.getAttribute(Unknown Source)
      	at org.openqa.selenium.support.ui.ExpectedConditions$37.apply(ExpectedConditions.java:1052)
      	at org.openqa.selenium.support.ui.ExpectedConditions$37.apply(ExpectedConditions.java:1047)
      	at org.openqa.selenium.support.ui.ExpectedConditions$48.apply(ExpectedConditions.java:1413)
      	at org.openqa.selenium.support.ui.ExpectedConditions$48.apply(ExpectedConditions.java:1409)
      	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
      	... 61 more
      Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: .admin\-menu
      For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
      Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
      System info: host: '90874b609516', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-9-amd64', java.version: '1.8.0_242'
      Driver info: org.openqa.selenium.firefox.FirefoxDriver
      Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 74.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20200309095159, moz:geckodriverVersion: 0.26.0, moz:headless: false, moz:processID: 1222, moz:profile: /tmp/rust_mozprofilejdu0qM, moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, platformVersion: 4.19.0-9-amd64, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
      Session ID: 03081074-9a04-4d7a-8b42-3405993ffffe
      *** Element info: {Using=class name, value=admin-menu}
      	at sun.reflect.GeneratedConstructorAccessor38.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
      	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
      	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
      	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
      	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
      	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
      	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
      	at org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName(RemoteWebDriver.java:412)
      	at org.openqa.selenium.By$ByClassName.findElement(By.java:389)
      	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
      	at org.xwiki.test.ui.XWikiWebDriver.findElement(XWikiWebDriver.java:657)
      	at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:69)
      	at org.openqa.selenium.support.pagefactory.AjaxElementLocator.access$001(AjaxElementLocator.java:39)
      	at org.openqa.selenium.support.pagefactory.AjaxElementLocator$SlowLoadingElement.isLoaded(AjaxElementLocator.java:165)
      	at org.openqa.selenium.support.ui.SlowLoadableComponent.get(SlowLoadableComponent.java:72)
      	at org.openqa.selenium.support.pagefactory.AjaxElementLocator.findElement(AjaxElementLocator.java:95)
      	... 68 more
      

      Using AfterClass is an anti-pattern, this class should be migrated to a docker test.

      Attachments

        Activity

          People

            mleduc Manuel Leduc
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: