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

XE doesn't stop if there's a failure during the PersistentTestContext initialization

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.1
    • Fix Version/s: 6.2-rc-1
    • Component/s: Test Framework
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      This can happen for example when we get this error (as you can see in the log, XE is not stopped):

      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running org.xwiki.test.ui.AllTests
      13:24:35.773 [main] INFO  o.x.test.integration.XWikiExecutor - Starting XWiki server at [http://localhost:8080/xwiki/bin/get/Main/]
      13:24:35.793 [main] INFO  o.x.test.integration.XWikiExecutor - Checking that XWiki is up and running...
      13:24:35.843 [Thread-1] INFO  o.x.t.i.XWikiLogOutputStream - Starting Jetty on port 8080, please wait...
      13:24:36.290 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - Error binding monitor port 8079: java.net.BindException: Cannot assign requested address
      13:24:46.406 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:46,403 [main] INFO  o.x.s.s.i.EmbeddedSolrInstance - Starting embedded Solr server... 
      13:24:46.413 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:46,411 [main] INFO  o.x.s.s.i.EmbeddedSolrInstance - Using Solr home directory: [data/solr] 
      13:24:49.660 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:49,657 [coreLoadExecutor-4-thread-1] WARN  o.a.s.c.SolrCore               - [xwiki] Solr index directory '/home/hudsonagent/jenkins_root/workspace/xwiki-enterprise-test-extension/xwiki-enterprise-test/xwiki-enterprise-test-extension/target/xwiki-enterprise-jetty-hsqldb-6.2-SNAPSHOT/data/solr/xwiki/data/index' doesn't exist. Creating new index... 
      13:24:50.336 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:50,336 [coreLoadExecutor-4-thread-1] WARN  o.a.s.r.ManagedResource        - No stored data found for /rest/managed 
      13:24:50.336 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:50,336 [coreLoadExecutor-4-thread-1] WARN  o.a.s.r.ManagedResource        - No registered observers for /rest/managed 
      13:24:50.499 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:50,498 [main] INFO  o.x.s.s.i.EmbeddedSolrInstance - Started embedded Solr server. 
      13:24:51.474 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:51.474:INFO:oxtjl.NotifyListener:----------------------------------
      13:24:51.475 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:51.475:INFO:oxtjl.NotifyListener:Server started, you can now open http://localhost:8080/ in your browser to access your wiki.
      13:24:51.475 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:51.475:INFO:oxtjl.NotifyListener:----------------------------------
      13:24:55.746 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:55,746 [XWiki initialization] INFO  .HibernateDataMigrationManager - Storage schema updates and data migrations are enabled 
      13:24:55.747 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:55,747 [XWiki initialization] INFO  .HibernateDataMigrationManager - No data migration to apply for wiki [xwiki] currently in version [54300] 
      13:24:55.747 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:24:55,747 [XWiki initialization] INFO  .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki] 
      13:25:02.187 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:25:02,187 [XWiki Solr index job thread] INFO  o.x.s.s.i.j.IndexerJob         - Starting job of type [solr.indexer] with identifier [[solr, indexer]] 
      13:25:03.315 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:25:03,315 [XWiki Solr index job thread] INFO  o.x.s.s.i.j.IndexerJob         - 564 documents added, 0 deleted and 0 updated during the synchronization of the Solr index. 
      13:25:03.316 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:25:03,316 [XWiki Solr index job thread] INFO  o.x.s.s.i.j.IndexerJob         - Finished job of type [solr.indexer] with identifier [[solr, indexer]] 
      13:25:04.679 [Thread-2] ERROR o.x.t.i.XWikiLogOutputStream - 2014-09-09 13:25:04,673 [Active Installs Ping Thread] WARN  a.i.c.ActiveInstallsPingThread - Failed to send Active Installation ping to [http://extensions.xwiki.org/activeinstalls]. Error = [SocketTimeoutException: Read timed out]. Will retry in [86400] seconds... 
      13:25:05.926 [main] INFO  o.x.test.integration.XWikiExecutor - Server is answering to [http://localhost:8080/xwiki/bin/get/Main/]... cool
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 77.719 sec <<< FAILURE! - in org.xwiki.test.ui.AllTests
      org.xwiki.test.ui.AllTests  Time elapsed: 77.718 sec  <<< ERROR!
      java.lang.RuntimeException: Failed to initialize PersistentTestContext
      	at org.xwiki.test.ui.PageObjectSuite.beforeTests(PageObjectSuite.java:67)
      	at org.xwiki.test.integration.XWikiExecutorSuite.run(XWikiExecutorSuite.java:170)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      Caused by: org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
      Build info: version: '2.42.2', revision: '6a6995d31c7c56c340d6f45a76976d43506cd6cc', time: '2014-06-03 10:52:47'
      System info: host: 'vagent-3-3-dev', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.23-vs2.3.6.8-beng', java.version: '1.7.0_67'
      Driver info: driver.version: FirefoxDriver
      	at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:98)
      	at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:84)
      	at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
      	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
      	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
      	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
      	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
      	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:99)
      	at org.xwiki.test.ui.WebDriverFactory.createWebDriver(WebDriverFactory.java:56)
      	at org.xwiki.test.ui.PersistentTestContext.<init>(PersistentTestContext.java:72)
      	at org.xwiki.test.ui.PageObjectSuite.beforeTests(PageObjectSuite.java:59)
      	... 7 more
      
      
      Results :
      
      Tests in error: 
        JUnit4Provider.invoke:124->executeTestSet:153->execute:264 ยป Runtime Failed to...
      
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
      
      [ERROR] There are test failures.
      
      Please refer to /home/hudsonagent/jenkins_root/workspace/xwiki-enterprise-test-extension/xwiki-enterprise-test/xwiki-enterprise-test-extension/target/surefire-reports for the individual test results.
      [JENKINS] Recording test results
      log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
      log4j:WARN Please initialize the log4j system properly.
      [INFO] 
      

        Attachments

          Activity

            People

            • Assignee:
              vmassol Vincent Massol
              Reporter:
              vmassol Vincent Massol
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: