Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-11214

Periodic recovery does not recover XAResource after jvm crash when agroal subsystem is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Agroal, Transactions
    • None
    • Hide
      1. get wildfly-14.0.0.Final
      2. download postgresql96 jdbc driver or use your own
      3. clone crashrec testsuite
      4. run command (change ds0* properties at your will)
        Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
        mvn clean verify -Djboss.dist=path-to-wildfly -Dtest=JPACrashRecoveryTestCase#commitHaltSecond -Dds0.db=postgresql94 -Dds0.jdbc.driver.jar=postgresql-42.2.2.jar -Dds0.jdbc.driver.class=org.postgresql.Driver -Dds0.jdbc.xa-class=org.postgresql.xa.PGXADataSource -Dds0.jdbc.driver.path=path-to-driver -Dds0.hibernate.dialect=org.hibernate.dialect.PostgreSQL82Dialect -Dds0.db.name=crashrec -Dds0.user=crashrec -Dds0.pass=crashrec -Dds0.jdbc.url=jdbc:postgresql://postgres-96.rhev-ci-vms.eng.rdu2.redhat.com:5432/crashrec  -Dskip-download-sources -U -B -Dmaven.test.failure.ignore=true -Dsurefire.test.failure.ignore=true -fn -Dsurefire.forked.process.timeout=0  -DagroalDS=true -DfailIfNoTests=false
        
      Show
      get wildfly-14.0.0.Final download postgresql96 jdbc driver or use your own clone crashrec testsuite run command (change ds0* properties at your will) Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml mvn clean verify -Djboss.dist=path-to-wildfly -Dtest=JPACrashRecoveryTestCase#commitHaltSecond -Dds0.db=postgresql94 -Dds0.jdbc.driver.jar=postgresql-42.2.2.jar -Dds0.jdbc.driver.class=org.postgresql.Driver -Dds0.jdbc.xa-class=org.postgresql.xa.PGXADataSource -Dds0.jdbc.driver.path=path-to-driver -Dds0.hibernate.dialect=org.hibernate.dialect.PostgreSQL82Dialect -Dds0.db.name=crashrec -Dds0.user=crashrec -Dds0.pass=crashrec -Dds0.jdbc.url=jdbc:postgresql: //postgres-96.rhev-ci-vms.eng.rdu2.redhat.com:5432/crashrec -Dskip-download-sources -U -B -Dmaven.test.failure.ignore= true -Dsurefire.test.failure.ignore= true -fn -Dsurefire.forked.process.timeout=0 -DagroalDS= true -DfailIfNoTests= false

      Scenario:
      Halts server at commit phase ...

      1. enlist TestXA resource
      2. enlist XA resource
      3. prepare TestXA resource
      4. prepare XA resource
      5. commit Test XA resource
      6. JVM crash
      7. recovery started
      8. commit XA resource

      Periodic recovery does not recover xa resource. It looks like agroal subsystem does not register xa resource to xa recovery module.

      Test outcome:

      Running org.jboss.as.test.jbossts.crashrec.test.JPACrashRecoveryTestCase
      Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 109.002 sec <<< FAILURE! - in org.jboss.as.test.jbossts.crashrec.test.JPACrashRecoveryTestCase
      commitHaltSecond(org.jboss.as.test.jbossts.crashrec.test.JPACrashRecoveryTestCase)  Time elapsed: 102.976 sec  <<< FAILURE!
      java.lang.AssertionError: Incorrect data in database after crash recovery. expected:<2> but was:<1>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotEquals(Assert.java:834)
      	at org.junit.Assert.assertEquals(Assert.java:645)
      	at org.jboss.as.test.jbossts.crashrec.test.JPABaseCrashRecoveryTestCase.checkAfterTestExecution(JPABaseCrashRecoveryTestCase.java:150)
      	at org.jboss.as.test.jbossts.crashrec.test.TestBaseCrashRecovery.commitHaltTest(TestBaseCrashRecovery.java:485)
      	at org.jboss.as.test.jbossts.crashrec.test.TestBaseCrashRecovery.commitHaltSecond(TestBaseCrashRecovery.java:418)
      	at org.jboss.as.test.jbossts.crashrec.test.JPACrashRecoveryTestCase.commitHaltSecond(JPACrashRecoveryTestCase.java:76)
      
      

              lbarreiro-1 Luis Barreiro
              istraka@redhat.com Ivan Straka
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: