Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1902

Provide environmental information when a test fails in the CI to help debug it

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.10
    • Fix Version/s: 12.2
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      FTM the idea is to execute the following:

                  LOGGER.info("Environment information to help debug the failing test:");
                  LOGGER.info(RuntimeUtils.run("top -b -n 1"));
                  LOGGER.info(RuntimeUtils.run("lsof -i -P -n "));
                  LOGGER.info(RuntimeUtils.run("docker ps -a"));
                  LOGGER.info(RuntimeUtils.run("docker events --since '15m' --until '0m'"));
      
      • Top: help find out if the test failure is because the CI agent is overloaded
      • lsof: help find out if the test failure is because some port is already used by some other process
      • docker ps: find out if docker is up and what's running in it
      • docker events: detailed logs about what happened on docker in the past 15 minutes before the test failed

        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: