Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-3502

Fix debug options in test-runner

XMLWordPrintable

      Test-runner doesn't handle debug options correctly.

      If jdpa profile is used, surefire jvm uses this JVM attribute: -agentlib:jdwp=transport=dt_socket,address=${as.debug.port},server=y,suspend=y.

      The same attribute is passed to started server. But server debugging should be set by wildfly.debug and wildfly.debug.port java properties. So if user wants to debug surefire with 8787 port and server with 8786 port, user uses jdpa profile, wildfly.debug property and wildfly.debug.port property and test fails:

      mvn test -DfailIfNoTests=false -DtestLogToFile=false -Dtest=CdTestCase -Djpda -Dwildfly.debug=true -Dwildfly.debug.port=8786

      ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.
      Error occurred during initialization of VM
      agent library failed to init: jdwp
      Running null
      

              ehugonne1@redhat.com Emmanuel Hugonnet
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: