Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 681811 Details for
Bug 900933
Upgrade to JBoss Transactions 4.16.6.Final
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
4165.diff
4165.diff (text/x-patch), 100.46 KB, created by
tom.jenkinson
on 2012-09-26 16:46:38 UTC
(
hide
)
Description:
4165.diff
Filename:
MIME Type:
Creator:
tom.jenkinson
Created:
2012-09-26 16:46:38 UTC
Size:
100.46 KB
patch
obsolete
>Index: ArjunaJTA/INSTALL >=================================================================== >--- ArjunaJTA/INSTALL (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaJTA/INSTALL (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,5 +1,5 @@ > >-JBossTS 4.16.4.Final is designed for use standalone. >+JBossTS 4.16.5.Final is designed for use standalone. > It may also be used by JBossAS 7.1 releases, but manual upgrading of the component inside JBossAS is not recommended. > Integration with JBossAS 6 or earlier is no longer supported. > >Index: ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/RecoveryXids.java >=================================================================== >--- ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/RecoveryXids.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/RecoveryXids.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -142,6 +142,18 @@ > > return _whenFirstSeen.containsKey(xidImple); > } >+ >+ // JBTM-924 >+ public boolean isStale() { >+ long now = System.currentTimeMillis(); >+ // JBTM-1255 - use a different safety declaration for staleness, if you set a safety interval of 0 (using reflection) then >+ // you will detect everything as stale. The only time we actually set safetyIntervalMillis is in JBTM-895 unit test SimpleIsolatedServers >+ // so in the normal case this will behave as before >+ long threshold = _lastValidated+(2*safetyIntervalMillis < staleSafetyIntervalMillis ? staleSafetyIntervalMillis : 2*safetyIntervalMillis); >+ long diff = now - threshold; >+ boolean result = diff > 0; >+ return result; >+ } > > public boolean remove (Xid xid) > { >@@ -199,6 +211,10 @@ > private XAResource _xares; > private long _lastValidated; > >+ /** >+ * JBTM-1255 this is required to reinstate JBTM-924, see message in {@see RecoveryXids#isStale()} >+ */ >+ private static final int staleSafetyIntervalMillis = 20000; // The advice is that this (if made configurable is twice the safety interval) > // JBTM-916 removed final so 10000 is not inlined into source code until we make this configurable > // https://issues.jboss.org/browse/JBTM-842 > private static int safetyIntervalMillis = 10000; // may eventually want to make this configurable? >Index: ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java >=================================================================== >--- ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -196,10 +196,6 @@ > bottomUpRecovery(); > } > >- // JBTM-895 updated so that retrieving an XAResource triggers garbage collection, this is required because garbage collecting >- // The XA resources in a bottom up scenario (e.g. resourceInitiatedRecoveryForRecoveryHelpers) means that any xids that are >- // not eligible for recovery after the first scan may be removed as stale and due to the undocumented _xidScans check above will not be >- // reloaded > if (_xidScans != null) > { > Enumeration<XAResource> keys = _xidScans.keys(); >@@ -209,12 +205,9 @@ > XAResource theKey = keys.nextElement(); > RecoveryXids xids = _xidScans.get(theKey); > >- if (xids.remove(xid)) { >- if (xids.isEmpty()) { >- _xidScans.remove(theKey); >- } >+ // JBTM-1255 moved stale check back to bottomUpRecovery >+ if (xids.contains(xid)) > return theKey; >- } > } > } > >@@ -385,6 +378,16 @@ > resourceInitiatedRecoveryForRecoveryHelpers(); > > // JBTM-895 garbage collection is now done when we return XAResources {@see XARecoveryModule#getNewXAResource(XAResourceRecord)} >+ // JBTM-924 requires this here garbage collection, see JBTM-1155: >+ if (_xidScans != null) { >+ Set<XAResource> keys = new HashSet<XAResource>(_xidScans.keySet()); >+ for(XAResource theKey : keys) { >+ RecoveryXids recoveryXids = _xidScans.get(theKey); >+ if(recoveryXids.isStale()) { >+ _xidScans.remove(theKey); >+ } >+ } >+ } > } > > /** >Index: ArjunaJTA/jta/classes/com/arjuna/ats/jta/common/JTAEnvironmentBean.java >=================================================================== >--- ArjunaJTA/jta/classes/com/arjuna/ats/jta/common/JTAEnvironmentBean.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaJTA/jta/classes/com/arjuna/ats/jta/common/JTAEnvironmentBean.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -874,7 +874,7 @@ > * > * @return the name of the class implementing XAResourceRecordWrappingPlugin. > */ >- public String getXAResourceRecordWrappingPluginClassName() >+ public String getXaResourceRecordWrappingPluginClassName() > { > return xaResourceRecordWrappingPluginClassName; > } >@@ -884,7 +884,7 @@ > * > * @param xaResourceRecordWrappingPluginClassName the name of a class which implements XAResourceRecordWrappingPlugin. > */ >- public void setXAResourceRecordWrappingPluginClassName(String xaResourceRecordWrappingPluginClassName) >+ public void setXaResourceRecordWrappingPluginClassName(String xaResourceRecordWrappingPluginClassName) > { > synchronized(this) > { >Index: sharedbuild.xml >=================================================================== >--- sharedbuild.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ sharedbuild.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -81,17 +81,48 @@ > > <property name="byteman.dir" value="${global.ext.lib.dir}" /> > >- <path id="byteman.lib" > >- <pathelement location="${byteman.dir}/byteman.jar" /> >- <pathelement location="${byteman.dir}/byteman-bmunit.jar" /> >- <pathelement location="${byteman.dir}/byteman-install.jar" /> >- <pathelement location="${byteman.dir}/byteman-submit.jar" /> >- <pathelement location="${byteman.dir}/byteman-dtest.jar" /> >- <pathelement location="${java.home}/../lib/tools.jar" /> >- </path> >- > <taskdef resource="emma_ant.properties" classpathref="emma.lib" /> > >+ <condition property="isMacOS"> >+ <os family="mac"/> >+ </condition> >+ >+ <target name="path-init-mac" if="${isMacOS}"> >+ <path id="byteman.lib" > >+ <pathelement location="${byteman.dir}/byteman.jar" /> >+ <pathelement location="${byteman.dir}/byteman-bmunit.jar" /> >+ <pathelement location="${byteman.dir}/byteman-install.jar" /> >+ <pathelement location="${byteman.dir}/byteman-submit.jar" /> >+ <pathelement location="${byteman.dir}/byteman-dtest.jar" /> >+ </path> >+ <path id="perf.support.lib" > >+ <!-- jconsole performance graphing support >+ --> >+ <pathelement location="${sharedbuild.base.dir}/ext/orson-0.5.0.jar"/> >+ <pathelement location="${sharedbuild.base.dir}/ext/jcommon-1.0.10.jar"/> >+ <pathelement location="${sharedbuild.base.dir}/ext/jfreechart-1.0.6.jar"/> >+ <pathelement location="${java.home}/../Classes/jconsole.jar"/> >+ </path> >+ </target> >+ >+ <target name="path-init" unless="${isMacOS}"> >+ <path id="byteman.lib" > >+ <pathelement location="${byteman.dir}/byteman.jar" /> >+ <pathelement location="${byteman.dir}/byteman-bmunit.jar" /> >+ <pathelement location="${byteman.dir}/byteman-install.jar" /> >+ <pathelement location="${byteman.dir}/byteman-submit.jar" /> >+ <pathelement location="${byteman.dir}/byteman-dtest.jar" /> >+ <pathelement location="${java.home}/../lib/tools.jar" /> >+ </path> >+ <path id="perf.support.lib" > >+ <!-- jconsole performance graphing support >+ --> >+ <pathelement location="${sharedbuild.base.dir}/ext/orson-0.5.0.jar"/> >+ <pathelement location="${sharedbuild.base.dir}/ext/jcommon-1.0.10.jar"/> >+ <pathelement location="${sharedbuild.base.dir}/ext/jfreechart-1.0.6.jar"/> >+ <pathelement location="${java.home}/../lib/jconsole.jar"/> >+ </path> >+ </target> > > <target name="clean"> > <delete dir="${build.dir}"/> >@@ -104,7 +135,7 @@ > </for> > </target> > >- <target name="init"> >+ <target name="init" depends="path-init-mac,path-init"> > > <mkdir dir="${build.dir}"/> > <mkdir dir="${build.dir}/lib"/> >Index: scripts/hudson/narayana.sh >=================================================================== >--- scripts/hudson/narayana.sh (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ scripts/hudson/narayana.sh (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -10,7 +10,7 @@ > for i in `ps -eaf | grep java | grep "standalone*.xml" | grep -v grep | cut -c10-15`; do kill $i; done > > #BUILD JBOSSTS >-ant -Demma.enabled=false -Dpublican=false jbossall >+ant -Demma.enabled=false -Dpublican=false $@ jbossall > if [ "$?" != "0" ]; then > exit -1 > fi >@@ -24,13 +24,13 @@ > fi > > cd jboss-as >-git checkout -t origin/4_16_BRANCH >+git checkout -t origin/JBTM_EAP60x_MP > if [ "$?" != "0" ]; then > exit -1 > fi > > git remote add upstream git://github.com/jbossas/jboss-as.git >-git pull --rebase --ff-only upstream master >+git pull --rebase --ff-only upstream 7.1-next > if [ "$?" != "0" ]; then > exit -1 > fi >@@ -41,8 +41,11 @@ > fi > > #START JBOSS >-export JBOSS_HOME=${WORKSPACE}/jboss-as/build/target/jboss-as-7.1.2.Final-SNAPSHOT >-$JBOSS_HOME/bin/standalone.sh --server-config=../../docs/examples/configs/standalone-xts.xml& >+JBOSS_VERSION=`ls -1 ${WORKSPACE}/jboss-as/build/target | grep jboss-as` >+export JBOSS_HOME=${WORKSPACE}/jboss-as/build/target/${JBOSS_VERSION} >+ >+cp ${JBOSS_HOME}/docs/examples/configs/standalone-xts.xml ${JBOSS_HOME}/standalone/configuration >+$JBOSS_HOME/bin/standalone.sh --server-config=standalone-xts.xml& > sleep 10 > > #RUN XTS UNIT TESTS >@@ -143,7 +146,7 @@ > exit -1 > fi > >-mvn clean test >+mvn clean test -Parq -Dorg.jboss.remoting-jmx.timeout=300 > if [ "$?" != "0" ]; then > exit -1 > fi >@@ -185,6 +188,8 @@ > exit -1 > fi > >+[ -z "${MFACTOR+x}" ] || sed -i TaskImpl.properties -e "s/COMMAND_LINE_12=-DCoreEnvironmentBean.timeoutFactor=[0-9]*/COMMAND_LINE_12=-DCoreEnvironmentBean.timeoutFactor=${MFACTOR}/" >+ > sed -i TaskImpl.properties -e "s#^COMMAND_LINE_0=.*#COMMAND_LINE_0=${JAVA_HOME}/bin/java#" > if [ "$?" != "0" ]; then > exit -1 >Index: docs/development_guide/en-US/Development_Guide.ent >=================================================================== >--- docs/development_guide/en-US/Development_Guide.ent (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/development_guide/en-US/Development_Guide.ent (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,6 +1,6 @@ > <!ENTITY PRODUCT "JBoss Transactions"> > <!ENTITY BOOKID "Development_Guide"> >-<!ENTITY VERSION "4.16.4.Final"> >+<!ENTITY VERSION "4.16.5.Final"> > <!ENTITY YEAR "2011"> > <!ENTITY HOLDER "JBoss.org"> > <!ENTITY APPSERVER "JBoss Application Server"> >Index: docs/development_guide/en-US/Book_Info.xml >=================================================================== >--- docs/development_guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/development_guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -7,7 +7,7 @@ > <title>Development Guide</title> > <subtitle> Development reference guide for the JBoss Transactions suite of software</subtitle> > <productname>JBoss Transactions</productname> >- <productnumber>4.16.4.Final</productnumber> >+ <productnumber>4.16.5.Final</productnumber> > <edition>0</edition> > <pubsnumber>0</pubsnumber> > <abstract> >Index: docs/development_guide/en-US/Important_Log_Messages.xml >=================================================================== >--- docs/development_guide/en-US/Important_Log_Messages.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/development_guide/en-US/Important_Log_Messages.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -3,7 +3,7 @@ > <!ENTITY % BOOK_ENTITIES SYSTEM "Development_Guide.ent"> > <!ENTITY PRODUCT "JBoss Transactions"> > <!ENTITY BOOKID "Development_Guide"> >-<!ENTITY VERSION "4.16.4.Final"> >+<!ENTITY VERSION "4.16.5.Final"> > <!ENTITY YEAR "2011"> > <!ENTITY HOLDER "JBoss.org"> > <!ENTITY APPSERVER "JBoss Application Server"> >Index: docs/failure_recovery_guide/en-US/Book_Info.xml >=================================================================== >--- docs/failure_recovery_guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/failure_recovery_guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -6,7 +6,7 @@ > <bookinfo id="book-Failure_Recovery_Guide"> > <title>Failure Recovery Guide</title> > <productname>JBoss Transactions</productname> >- <productnumber>4.16.4.Final</productnumber> >+ <productnumber>4.16.5.Final</productnumber> > <edition>0</edition> > <pubsnumber>0</pubsnumber> > <abstract> >Index: docs/failure_recovery_guide/en-US/Failure_Recovery_Guide.ent >=================================================================== >--- docs/failure_recovery_guide/en-US/Failure_Recovery_Guide.ent (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/failure_recovery_guide/en-US/Failure_Recovery_Guide.ent (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,6 +1,6 @@ > <!ENTITY PRODUCT "JBoss Transactions"> > <!ENTITY BOOKID "Failure_Recovery_Guide"> >-<!ENTITY VERSION "4.16.4.Final"> >+<!ENTITY VERSION "4.16.5.Final"> > <!ENTITY YEAR "2011"> > <!ENTITY HOLDER "JBoss.org"> > <!ENTITY APPSERVER "JBoss Application Server"> >Index: docs/failure_recovery_guide/en-US/Revision_History.xml >=================================================================== >--- docs/failure_recovery_guide/en-US/Revision_History.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/failure_recovery_guide/en-US/Revision_History.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -3,7 +3,7 @@ > <!ENTITY % BOOK_ENTITIES SYSTEM "Failure_Recovery_Guide.ent"> > <!ENTITY PRODUCT "JBoss Transactions"> > <!ENTITY BOOKID "Failure_Recovery_Guide"> >-<!ENTITY VERSION "4.16.4.Final"> >+<!ENTITY VERSION "4.16.5.Final"> > <!ENTITY YEAR "2011"> > <!ENTITY HOLDER "JBoss.org"> > <!ENTITY APPSERVER "JBoss Application Server"> >Index: docs/txbridge_guide/en-US/Book_Info.xml >=================================================================== >--- docs/txbridge_guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/txbridge_guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -6,7 +6,7 @@ > <bookinfo id="book-Transaction_Bridging_Guide"> > <title>Transaction Bridging Guide</title> > <productname>JBoss Transactions</productname> >- <productnumber>4.16.4.Final</productnumber> >+ <productnumber>4.16.5.Final</productnumber> > <edition>0</edition> > <pubsnumber>0</pubsnumber> > <corpauthor> >Index: docs/txbridge_guide/en-US/Transaction_Bridging_Guide.ent >=================================================================== >--- docs/txbridge_guide/en-US/Transaction_Bridging_Guide.ent (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/txbridge_guide/en-US/Transaction_Bridging_Guide.ent (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,6 +1,6 @@ > <!ENTITY PRODUCT "JBoss Transactions"> > <!ENTITY BOOKID "Transaction_Bridging_Guide"> >-<!ENTITY VERSION "4.16.4.Final"> >+<!ENTITY VERSION "4.16.5.Final"> > <!ENTITY YEAR "2011"> > <!ENTITY HOLDER "JBoss.org"> > <!ENTITY APPSERVER "JBoss Application Server"> >Index: docs/transactions_overview_guide/en-US/Transactions_Overview_Guide.ent >=================================================================== >--- docs/transactions_overview_guide/en-US/Transactions_Overview_Guide.ent (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/transactions_overview_guide/en-US/Transactions_Overview_Guide.ent (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,6 +1,6 @@ > <!ENTITY PRODUCT "JBoss Transactions"> > <!ENTITY BOOKID "Transactions_Overview_Guide"> >-<!ENTITY VERSION "4.16.4.Final"> >+<!ENTITY VERSION "4.16.5.Final"> > <!ENTITY YEAR "2011"> > <!ENTITY HOLDER "JBoss.org"> > <!ENTITY APPSERVER "JBoss Application Server"> >Index: docs/transactions_overview_guide/en-US/Book_Info.xml >=================================================================== >--- docs/transactions_overview_guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ docs/transactions_overview_guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -6,7 +6,7 @@ > <bookinfo id="book-Transactions_Overview_Guide"> > <title>Transactions Overview Guide</title> > <productname>JBoss Transactions</productname> >- <productnumber>4.16.4.Final</productnumber> >+ <productnumber>4.16.5.Final</productnumber> > <edition>0</edition> > <pubsnumber>0</pubsnumber> > <abstract> >Index: ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java >=================================================================== >--- ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -58,6 +58,8 @@ > private volatile boolean allowMultipleLastResources = false; > private volatile boolean disableMultipleLastResourcesWarning = false; > >+ @FullPropertyName(name = "timeout.factor") >+ private volatile int timeoutFactor = 1; > > /** > * Returns the 'var' directory path. >@@ -306,6 +308,24 @@ > } > > /** >+ * Get a factor by which all crashrec delays in the QA test suited will be multiplied >+ * @return the multiplier >+ */ >+ public int getTimeoutFactor() >+ { >+ return timeoutFactor; >+ } >+ >+ /** >+ * Set a factor by which all crashrec delays in the QA test suited will be multiplied >+ * @param timeoutFactor the factor >+ */ >+ public void setTimeoutFactor(int timeoutFactor) >+ { >+ this.timeoutFactor = timeoutFactor; >+ } >+ >+ /** > * @return the version control tag of the source used, or "unknown" > */ > public String getBuildVersion() >Index: ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ActionBean.java >=================================================================== >--- ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ActionBean.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ActionBean.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -224,10 +224,6 @@ > RecordList oldList = ra.getRecords(lt); > RecordList newList = ra.getRecords(newStatus); > >- if (lt.equals(ParticipantStatus.HEURISTIC) && !targRecord.forgetHeuristic()) { >- return false; >- } >- > // move the record from currList to targList > if (oldList.remove(targRecord)) { > >Index: ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java >=================================================================== >--- ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -62,7 +62,7 @@ > * the current time of day in milliseconds. > */ > >- _absoluteTimeoutMills = (timeout * 1000) + System.currentTimeMillis(); >+ _absoluteTimeoutMills = (timeout * 1000L) + System.currentTimeMillis(); > > // add additional variation to distinguish instances created in the same millisecond. > _bias = getBiasCounter(); >Index: ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java >=================================================================== >--- ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -654,7 +654,7 @@ > private void doBackoffWait() > { > try { >- _stateLock.wait(_backoffPeriod * 1000); >+ _stateLock.wait(_backoffPeriod * 1000L); > } catch (InterruptedException e) { > // we can ignore this exception > } >@@ -669,7 +669,7 @@ > private void doPeriodicWait() > { > try { >- _stateLock.wait(_recoveryPeriod * 1000); >+ _stateLock.wait(_recoveryPeriod * 1000L); > } catch (InterruptedException e) { > // we can ignore this exception > } >Index: ArjunaCore/arjuna/build.xml >=================================================================== >--- ArjunaCore/arjuna/build.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaCore/arjuna/build.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -48,10 +48,7 @@ > <additional.classpath> > <!-- jconsole performance graphing support > --> >- <fileset dir="${sharedbuild.base.dir}/ext/" includes="orson-0.5.0.jar"/> >- <fileset dir="${sharedbuild.base.dir}/ext/" includes="jcommon-1.0.10.jar"/> >- <fileset dir="${sharedbuild.base.dir}/ext/" includes="jfreechart-1.0.6.jar"/> >- <fileset dir="${java.home}/../lib/" includes="jconsole.jar"/> >+ <path refid="perf.support.lib" /> > </additional.classpath> > </compile.macro> > </target> >Index: ArjunaCore/scripts/setup-env.sh >=================================================================== >--- ArjunaCore/scripts/setup-env.sh (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaCore/scripts/setup-env.sh (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -80,12 +80,15 @@ > EXT_CLASSPATH="$EXT_CLASSPATH$CPS$JBOSSTS_HOME/lib/ext/jndi.jar" > EXT_CLASSPATH="$EXT_CLASSPATH$CPS$JBOSSTS_HOME/lib/ext/jta-1_1-classes.zip" > EXT_CLASSPATH="$EXT_CLASSPATH$CPS$JBOSSTS_HOME/lib/ext/log4j-1.2.14.jar" >+EXT_CLASSPATH="$EXT_CLASSPATH$CPS$JBOSSTS_HOME/lib/ext/jboss-loggingjar" > > JACORB_CLASSPATH="$JACORB_HOME/lib/jacorb.jar" > JACORB_CLASSPATH="$JACORB_CLASSPATH$CPS$JACORB_HOME/lib/idl.jar" > JACORB_CLASSPATH="$JACORB_CLASSPATH$CPS$JACORB_HOME/lib/logkit-1.2.jar" > JACORB_CLASSPATH="$JACORB_CLASSPATH$CPS$JACORB_HOME/lib/avalon-framework-4.1.5.jar" > JACORB_CLASSPATH="$JACORB_CLASSPATH$CPS$JACORB_HOME/etc" >+JACORB_CLASSPATH="$JACORB_CLASSPATH$CPS$JACORB_HOME/lib/slf4j-jdk14-1.5.6.jar" >+JACORB_CLASSPATH="$JACORB_CLASSPATH$CPS$JACORB_HOME/lib/slf4j-api-1.5.6.jar" > > CLASSPATH=".$CPS$PRODUCT_CLASSPATH$CPS$EXT_CLASSPATH$CPS$JACORB_CLASSPATH" > export CLASSPATH >Index: ArjunaCore/scripts/withorb-setup-env.bat >=================================================================== >--- ArjunaCore/scripts/withorb-setup-env.bat (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaCore/scripts/withorb-setup-env.bat (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -50,6 +50,7 @@ > set EXT_CLASSPATH=%EXT_CLASSPATH%;%@HOME_DIRECTORY@%\lib\ext\log4j-1.2.14.jar > set EXT_CLASSPATH=%EXT_CLASSPATH%;%@HOME_DIRECTORY@%\lib\ext\xercesImpl.jar > set EXT_CLASSPATH=%EXT_CLASSPATH%;%@HOME_DIRECTORY@%\lib\ext\xmlParserAPIs.jar >+set EXT_CLASSPATH=%EXT_CLASSPATH%;%JBOSSTS_HOME%\lib\ext\jboss-logging.jar > > rem > rem Caution: JBossTS needs a specially patched version of JacORB. >Index: ArjunaCore/scripts/setup-env.bat >=================================================================== >--- ArjunaCore/scripts/setup-env.bat (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaCore/scripts/setup-env.bat (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -53,7 +53,9 @@ > set EXT_CLASSPATH=%EXT_CLASSPATH%;%JBOSSTS_HOME%\lib\ext\log4j-1.2.14.jar > set EXT_CLASSPATH=%EXT_CLASSPATH%;%JBOSSTS_HOME%\lib\ext\xercesImpl.jar > set EXT_CLASSPATH=%EXT_CLASSPATH%;%JBOSSTS_HOME%\lib\ext\xmlParserAPIs.jar >+set EXT_CLASSPATH=%EXT_CLASSPATH%;%JBOSSTS_HOME%\lib\ext\jboss-logging.jar > >+ > rem > rem Caution: JBossTS needs a specially patched version of JacORB. > rem Use %JBOSSTS_HOME%\jacorb here unless you have a good reason not to. >@@ -64,6 +66,8 @@ > set JACORB_CLASSPATH=%JACORB_CLASSPATH%;%JACORB_HOME%\lib\logkit-1.2.jar > set JACORB_CLASSPATH=%JACORB_CLASSPATH%;%JACORB_HOME%\lib\avalon-framework-4.1.5.jar > set JACORB_CLASSPATH=%JACORB_CLASSPATH%;%JACORB_HOME%\etc >+set JACORB_CLASSPATH=%JACORB_CLASSPATH%;%JACORB_HOME%\lib\slf4j-jdk14-1.5.6.jar >+set JACORB_CLASSPATH=%JACORB_CLASSPATH%;%JACORB_HOME%\lib\slf4j-api-1.5.6.jar > > set CLASSPATH=.;%PRODUCT_CLASSPATH%;%EXT_CLASSPATH%;%JACORB_CLASSPATH% > >Index: build.xml >=================================================================== >--- build.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ build.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -203,7 +203,7 @@ > <filterset> > <filter token="groupid" value="${groupid}"/> > <filter token="artifact" value="@{artifact}"/> >- <filter token="version" value="4.16.4.Final"/> >+ <filter token="version" value="4.16.5.Final"/> > <filter token="packaging" value="@{packaging}"/> > </filterset> > </copy> >Index: qa/TaskImpl.properties >=================================================================== >--- qa/TaskImpl.properties (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ qa/TaskImpl.properties (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -63,13 +63,15 @@ > # so setting a short periodicRecoveryPeriod is no longer useful. > #COMMAND_LINE_11=-DRecoveryEnvironmentBean.periodicRecoveryPeriod=10 > COMMAND_LINE_11=-DRecoveryEnvironmentBean.recoveryBackoffPeriod=5 >+#timeoutFactor is a multiplier by which delays are multiplied - set to a larger value on slow servers >+COMMAND_LINE_12=-DCoreEnvironmentBean.timeoutFactor=1 > # > # enable these to debug spawned processes. You may need to pause the test > # framework in a debugger too, or it may spawn multiple procs on the same > # debug port. > # >-#COMMAND_LINE_12=-Xdebug >-#COMMAND_LINE_13=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006 >+#COMMAND_LINE_13=-Xdebug >+#COMMAND_LINE_14=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006 > > > # >Index: qa/tests/src/org/jboss/jbossts/qa/CrashRecovery11Utils/Delays.java >=================================================================== >--- qa/tests/src/org/jboss/jbossts/qa/CrashRecovery11Utils/Delays.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ qa/tests/src/org/jboss/jbossts/qa/CrashRecovery11Utils/Delays.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -32,6 +32,7 @@ > package org.jboss.jbossts.qa.CrashRecovery11Utils; > > import com.arjuna.ats.arjuna.common.recoveryPropertyManager; >+import com.arjuna.ats.arjuna.common.arjPropertyManager; > > public class Delays > { >@@ -41,6 +42,11 @@ > > int _backoffPeriod = recoveryPropertyManager.getRecoveryEnvironmentBean().getRecoveryBackoffPeriod(); > >+ int _delayFactor = arjPropertyManager.getCoreEnvironmentBean().getTimeoutFactor(); >+ >+ _backoffPeriod *= _delayFactor; >+ _recoveryPeriod *= _delayFactor; >+ > return (_backoffPeriod + _recoveryPeriod + (5 * 1000) /*5 secs for processing*/); > } > } >Index: qa/tests/src/org/jboss/jbossts/qa/Utils/CrashRecoveryDelays.java >=================================================================== >--- qa/tests/src/org/jboss/jbossts/qa/Utils/CrashRecoveryDelays.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ qa/tests/src/org/jboss/jbossts/qa/Utils/CrashRecoveryDelays.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -21,6 +21,7 @@ > package org.jboss.jbossts.qa.Utils; > > import com.arjuna.ats.arjuna.common.recoveryPropertyManager; >+import com.arjuna.ats.arjuna.common.arjPropertyManager; > > import java.io.BufferedReader; > import java.io.PrintStream; >@@ -150,8 +151,28 @@ > awaitReplayCompletion(5); // was 60 > } > >+ public static void awaitReplayCompletionCR06() throws InterruptedException { >+ awaitReplayCompletion(10); // was 5 >+ } >+ > private static void awaitReplayCompletion(int seconds) throws InterruptedException > { >- Thread.sleep(seconds * 1000); >+ Thread.sleep(getDelayFactor() * seconds * 1000); > } >+ >+ private static int getDelayFactor() { >+ if (delayFactor < 0) { >+ delayFactor = arjPropertyManager.getCoreEnvironmentBean().getTimeoutFactor(); >+// delayFactor = Integer.getInteger("timeout.factor", 1); >+ >+ if (delayFactor <= 0) >+ delayFactor = 1; >+ >+ System.out.printf("Using timeout delay factor of %d%n", delayFactor); >+ } >+ >+ return delayFactor; >+ } >+ >+ private static int delayFactor = -1; > } >Index: ArjunaJTS/INSTALL >=================================================================== >--- ArjunaJTS/INSTALL (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ ArjunaJTS/INSTALL (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,5 +1,5 @@ > >-JBossTS 4.16.4.Final is designed for use standalone. >+JBossTS 4.16.5.Final is designed for use standalone. > It may also be used by JBossAS 7.1 releases, but manual upgrading of the component inside JBossAS is not recommended. > Integration with JBossAS 6 or earlier is no longer supported. > >Index: txbridge/demo-test/src/test/java/org/jboss/jbossts/txbridge/demotest/TxBridgeDemoTest.java >=================================================================== >--- txbridge/demo-test/src/test/java/org/jboss/jbossts/txbridge/demotest/TxBridgeDemoTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/demo-test/src/test/java/org/jboss/jbossts/txbridge/demotest/TxBridgeDemoTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -21,13 +21,13 @@ > */ > package org.jboss.jbossts.txbridge.demotest; > >-import static org.jboss.arquillian.ajocado.Ajocado.elementPresent; >-import static org.jboss.arquillian.ajocado.Ajocado.name; >-import static org.jboss.arquillian.ajocado.Ajocado.waitForHttp; >-import static org.jboss.arquillian.ajocado.Ajocado.waitModel; >-import static org.jboss.arquillian.ajocado.Ajocado.xp; >+import static org.jboss.arquillian.ajocado.Graphene.elementPresent; >+import static org.jboss.arquillian.ajocado.Graphene.name; >+import static org.jboss.arquillian.ajocado.Graphene.waitForHttp; >+import static org.jboss.arquillian.ajocado.Graphene.waitModel; >+import static org.jboss.arquillian.ajocado.Graphene.xp; > >-import org.jboss.arquillian.ajocado.framework.AjaxSelenium; >+import org.jboss.arquillian.ajocado.framework.GrapheneSelenium; > import org.jboss.arquillian.ajocado.locator.NameLocator; > import org.jboss.arquillian.ajocado.locator.XPathLocator; > import org.jboss.arquillian.container.test.api.Deployment; >@@ -74,9 +74,8 @@ > private static final String PARENT_TX_TYPE_JTA = "JTA"; > > >- // load ajocado driver > @Drone >- AjaxSelenium driver; >+ GrapheneSelenium driver; > > > protected NameLocator TX_TYPE_FIELD = name("txType"); >Index: txbridge/demo-test/src/test/resources/arquillian.xml >=================================================================== >--- txbridge/demo-test/src/test/resources/arquillian.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/demo-test/src/test/resources/arquillian.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -3,10 +3,12 @@ > > <container qualifier="jboss" default="true"> > <configuration> >- <property name="serverConfig">../../docs/examples/configs/standalone-xts.xml</property> >+ <property name="serverConfig">standalone-xts.xml</property> >+ <property name="javaVmArguments">${server.jvm.args}</property> >+ <property name="managementAddress">${node0:127.0.0.1}</property> > </configuration> > </container> >- <extension qualifier="ajocado"> >+ <extension qualifier="graphene"> > <property name="seleniumTimeoutDefault">60000</property> > <property name="seleniumTimeoutGui">60000</property> > <property name="seleniumTimeoutAjax">60000</property> >Index: txbridge/demo-test/pom.xml >=================================================================== >--- txbridge/demo-test/pom.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/demo-test/pom.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -11,19 +11,33 @@ > > <properties> > <version.jbossas>7.1.1.Final</version.jbossas> >- <version.arquillian.junit>1.0.0.Final</version.arquillian.junit> >- <version.arquillian.drone>1.0.0.Final</version.arquillian.drone> >- <version.arquillian.ajocado.junit>1.0.0.CR2</version.arquillian.ajocado.junit> >+ <version.org.jboss.arquillian>1.0.0.Final</version.org.jboss.arquillian> >+ <version.org.jboss.arquillian.drone>1.0.0.Final</version.org.jboss.arquillian.drone> >+ <version.org.jboss.arquillian.graphene>1.0.0.Final</version.org.jboss.arquillian.graphene> > <version.junit>4.8.2</version.junit> >+ >+ <jvm.args.ip>-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false</jvm.args.ip> >+ <jvm.args.ip.server>${jvm.args.ip}</jvm.args.ip.server> >+ <jvm.args.ip.client>${jvm.args.ip}</jvm.args.ip.client> >+ <node0>127.0.0.1</node0> >+ <surefire.forked.process.timeout>1200</surefire.forked.process.timeout> > </properties> > > <dependencyManagement> > <dependencies> >+ <!-- Arquillian Core dependencies --> >+ <dependency> >+ <groupId>org.jboss.arquillian</groupId> >+ <artifactId>arquillian-bom</artifactId> >+ <version>${version.org.jboss.arquillian}</version> >+ <type>pom</type> >+ <scope>import</scope> >+ </dependency> > <!-- Arquillian Drone dependencies and Selenium dependencies --> > <dependency> > <groupId>org.jboss.arquillian.extension</groupId> > <artifactId>arquillian-drone-bom</artifactId> >- <version>${version.arquillian.drone}</version> >+ <version>${version.org.jboss.arquillian.drone}</version> > <type>pom</type> > <scope>import</scope> > </dependency> >@@ -49,14 +63,14 @@ > <dependency> > <groupId>org.jboss.arquillian.junit</groupId> > <artifactId>arquillian-junit-container</artifactId> >- <version>${version.arquillian.junit}</version> >+ <version>${version.org.jboss.arquillian}</version> > <scope>test</scope> > </dependency> > > <dependency> >- <groupId>org.jboss.arquillian.ajocado</groupId> >- <artifactId>arquillian-ajocado-junit</artifactId> >- <version>${version.arquillian.ajocado.junit}</version> >+ <groupId>org.jboss.arquillian.graphene</groupId> >+ <artifactId>arquillian-graphene</artifactId> >+ <version>${version.org.jboss.arquillian.graphene}</version> > <type>pom</type> > <scope>test</scope> > </dependency> >@@ -112,12 +126,38 @@ > <directory>${basedir}</directory> > <includes> > <include>restaurantManagerState</include> >+ <include>theatreManagerState</include> > </includes> > <followSymlinks>false</followSymlinks> > </fileset> > </filesets> > </configuration> > </plugin> >+ <plugin> >+ <groupId>org.apache.maven.plugins</groupId> >+ <artifactId>maven-surefire-plugin</artifactId> >+ <version>2.11</version> >+ <configuration> >+ <redirectTestOutputToFile>true</redirectTestOutputToFile> >+ <enableAssertions>true</enableAssertions> >+ <!--<workingDirectory>${basedir}/target/workdir</workingDirectory> <!– Work in submodule's own dir. –>--> >+ >+ <!-- Forked process timeout --> >+ <forkedProcessTimeoutInSeconds>${surefire.forked.process.timeout}</forkedProcessTimeoutInSeconds> >+ <!-- System properties to forked surefire JVM which runs clients. --> >+ <argLine>${jvm.args.ip.client}</argLine> >+ >+ <!-- System properties passed to test cases --> >+ <systemPropertyVariables> >+ <node0>${node0}</node0> >+ <!-- >+ Used in arquillian.xml - arguments for all JBoss AS instances. >+ System properties are duplicated here until ARQ-647 is implemented. >+ --> >+ <server.jvm.args>-Xmx512m -XX:MaxPermSize=128m ${jvm.args.ip.server} -Djboss.bind.address=${node0} -Djboss.bind.address.management=${node0}</server.jvm.args> >+ </systemPropertyVariables> >+ </configuration> >+ </plugin> > </plugins> > </build> > >@@ -136,5 +176,14 @@ > </dependency> > </dependencies> > </profile> >+ >+ <profile> >+ <id>ipv6</id> >+ <activation><property><name>ipv6</name></property></activation> >+ <properties> >+ <jvm.args.ip>-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true</jvm.args.ip> >+ <node0>[::1]</node0> >+ </properties> >+ </profile> > </profiles> > </project> >Index: txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/service/TestServiceImpl.java >=================================================================== >--- txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/service/TestServiceImpl.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/service/TestServiceImpl.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -40,7 +40,7 @@ > * > * @author Jonathan Halliday (jonathan.halliday@redhat.com) 2010-03 > */ >-@WebService() >+@WebService(targetNamespace = "http://client.outbound.tests.txbridge.jbossts.jboss.org/") > @SOAPBinding(style = SOAPBinding.Style.RPC) > @HandlerChain(file = "/jaxws-handlers-server.xml") // relative path from the class file > @WebServlet(name="OutboundTestServiceServlet", urlPatterns=TestServiceImpl.URL_PATTERN) >Index: txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/client/TestService.java >=================================================================== >--- txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/client/TestService.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/client/TestService.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -28,8 +28,7 @@ > * > * @author Jonathan Halliday (jonathan.halliday@redhat.com) 2010-03 > */ >-@WebService(targetNamespace = "http://service.outbound.tests.txbridge.jbossts.jboss.org/", >- portName = "TestServiceImplPort") >+@WebService(name = "TestServiceImpl", targetNamespace = "http://client.outbound.tests.txbridge.jbossts.jboss.org/") > @SOAPBinding(style = SOAPBinding.Style.RPC) > public interface TestService { > public void doNothing(); >Index: txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/client/TestClient.java >=================================================================== >--- txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/client/TestClient.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/client/TestClient.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -74,7 +74,7 @@ > userTransaction = (UserTransaction) ic.lookup("java:comp/UserTransaction"); > > URL wsdlLocation = new URL("http://localhost:8080/txbridge-outbound-tests-service/TestServiceImpl?wsdl"); >- QName serviceName = new QName("http://service.outbound.tests.txbridge.jbossts.jboss.org/", "TestServiceImplService"); >+ QName serviceName = new QName("http://client.outbound.tests.txbridge.jbossts.jboss.org/", "TestServiceImplService"); > > Service service = Service.create(wsdlLocation, serviceName); > testService = service.getPort(TestService.class); >Index: txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/common/AbstractCrashRecoveryTests.java >=================================================================== >--- txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/common/AbstractCrashRecoveryTests.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/common/AbstractCrashRecoveryTests.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -57,7 +57,7 @@ > protected void rebootServer(ContainerController controller) throws Exception { > > instrumentor.removeLocalState(); >- File rulesFile = File.createTempFile("jbosstxbridgetests", ".btm"); >+ File rulesFile = File.createTempFile("jbosstxbridgetests", ""); > rulesFile.deleteOnExit(); > instrumentor.setRedirectedSubmissionsFile(rulesFile); > >Index: txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/extension/JBossTSAS7ServerKillProcessor.java >=================================================================== >--- txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/extension/JBossTSAS7ServerKillProcessor.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/extension/JBossTSAS7ServerKillProcessor.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,38 +1,122 @@ >-/* >- * JBoss, Home of Professional Open Source. >- * Copyright 2011, Red Hat, Inc., and individual contributors >- * as indicated by the @author tags. See the copyright.txt file in the >- * distribution for a full listing of individual contributors. >- * >- * This is free software; you can redistribute it and/or modify it >- * under the terms of the GNU Lesser General Public License as >- * published by the Free Software Foundation; either version 2.1 of >- * the License, or (at your option) any later version. >- * >- * This software is distributed in the hope that it will be useful, >- * but WITHOUT ANY WARRANTY; without even the implied warranty of >- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >- * Lesser General Public License for more details. >- * >- * You should have received a copy of the GNU Lesser General Public >- * License along with this software; if not, write to the Free >- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA >- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. >- */ > package org.jboss.jbossts.txbridge.tests.extension; > >+ >+import java.io.BufferedReader; >+import java.io.IOException; >+import java.io.InputStream; >+import java.io.InputStreamReader; >+import java.util.Map; >+import java.util.logging.Logger; >+ > import org.jboss.arquillian.container.spi.Container; > import org.jboss.arquillian.container.spi.ServerKillProcessor; > >-/** >- * Server extension for JBossTSAS7ServerKillProcessor. >- * >- * @author <a href="mailto:istudens@redhat.com">Ivo Studensky</a> >- */ > public class JBossTSAS7ServerKillProcessor implements ServerKillProcessor { > >+ private static final Logger logger = Logger.getLogger(JBossTSAS7ServerKillProcessor.class.getName()); >+ private static final String CHECK_JBOSS_ALIVE_CMD = "if [ \"$(jps | grep jboss-modules.jar)\" == \"\" ]; then exit 1; fi"; >+ private static final String CHECK_FOR_DEFUNCT_JAVA_CMD = "if [ \"$(ps aux | grep '\\[java\\] <defunct>')\" == \"\" ]; then exit 1; fi"; >+ private static final String SHUTDOWN_JBOSS_CMD = "jps | grep jboss-modules.jar | awk '{ print $1 }' | xargs kill"; >+ >+ private int checkPeriodMillis = 10 * 1000; >+ private int numChecks = 60; >+ >+ private static int processLogId = 0; >+ >+ @Override > public void kill(Container container) throws Exception { >- // do nothing, just let Arquillian know that the container is down >+ logger.info("waiting for byteman to kill the server"); >+ >+ for (int i = 0; i < numChecks; i++) { >+ >+ if (jbossIsAlive()) { >+ Thread.sleep(checkPeriodMillis); >+ logger.info("jboss-as is still alive, sleeping for a further " + checkPeriodMillis + "ms"); >+ } else if (isDefunctJavaProcess()) { >+ logger.info("Found a defunct java process, sleeping for a further " + checkPeriodMillis + "ms"); >+ dumpProcesses(container); >+ } else { >+ logger.info("jboss-as killed by byteman scirpt"); >+ dumpProcesses(container); >+ return; >+ } >+ } >+ >+ //We've waited long enough for Byteman to kil the server and it has not yet done it. >+ // Kill the server manually and fail the test >+ shutdownJBoss(); >+ throw new RuntimeException("jboss-as was not killed by Byteman, this indicates a test failure"); > } >-} > >+ private boolean jbossIsAlive() throws Exception { >+ int exitCode = runShellCommand(CHECK_JBOSS_ALIVE_CMD); >+ >+ //Command will 'exit 1' if jboss is not running and 'exit 0' if it is >+ return exitCode == 0; >+ } >+ >+ private boolean isDefunctJavaProcess() throws Exception { >+ int exitCode = runShellCommand(CHECK_FOR_DEFUNCT_JAVA_CMD); >+ >+ //Command will 'exit 1' if a defunct java process is not running and 'exit 0' if there is >+ return exitCode == 0; >+ } >+ >+ >+ private void shutdownJBoss() throws Exception { >+ runShellCommand(SHUTDOWN_JBOSS_CMD); >+ >+ // wait 5 * 60 second for jboss-as shutdown complete >+ for (int i = 0; i < 60; i++) { >+ >+ if (jbossIsAlive()) { >+ Thread.sleep(5000); >+ } else { >+ logger.info("jboss-as shutdown after sending shutdown command"); >+ return; >+ } >+ } >+ } >+ >+ private int runShellCommand(String cmd) throws Exception { >+ logger.info("Executing shell command: '" + cmd + "'"); >+ ProcessBuilder pb = new ProcessBuilder("/bin/sh", "-c", cmd); >+ Process p = pb.start(); >+ p.waitFor(); >+ >+ dumpStream("std out", p.getInputStream()); >+ dumpStream("std error", p.getErrorStream()); >+ >+ p.destroy(); >+ >+ return p.exitValue(); >+ } >+ >+ private void dumpStream(String msg, InputStream is) { >+ try { >+ BufferedReader ein = new BufferedReader(new InputStreamReader(is)); >+ String res = ein.readLine(); >+ is.close(); >+ if (res != null) >+ { >+ System.out.printf("%s %s\n", msg, res); >+ } >+ } catch (IOException e) { >+ logger.info("Exception dumping stream: " + e.getMessage()); >+ } >+ } >+ >+ public void dumpProcesses(Container container) throws Exception >+ { >+ Map<String, String> config = container.getContainerConfiguration().getContainerProperties(); >+ String testClass = config.get("testClass"); >+ String scriptName = config.get("scriptName"); >+ >+ String dir = "./target/surefire-reports/processes"; >+ runShellCommand("mkdir -p " + dir); >+ >+ String logFile = dir + "/" + scriptName + ":" + testClass + "_" + processLogId++ + ".txt"; >+ runShellCommand("ps aux > " + logFile); >+ logger.info("Logged current running processes to: " + logFile); >+ } >+} >\ No newline at end of file >Index: txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/inbound/utility/TestXAResourceRecoveryHelper.java >=================================================================== >--- txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/inbound/utility/TestXAResourceRecoveryHelper.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/inbound/utility/TestXAResourceRecoveryHelper.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -59,7 +59,13 @@ > return instance; > } > >- protected TestXAResourceRecoveryHelper() { >+ /** >+ * This is required to be public (not protected) because of >+ * Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014227: EJB TestXAResourceRecoveryHelper of type rg.jboss.jbossts.txbridge.tests.inbound.utility.TestXAResourceRecoveryHelper must have public default constructor >+ * Clearly two instances will be created, one by the container for postConstruct/preDestroy and one by ourselves but as they both use getInstance() the code should work fine. >+ * This is not a new way of working it would have been like that before. >+ */ >+ public TestXAResourceRecoveryHelper() { > } > > /** >@@ -189,4 +195,4 @@ > return logFile; > } > >-} >\ No newline at end of file >+} >Index: txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/inbound/client/TestService.java >=================================================================== >--- txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/inbound/client/TestService.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/src/test/java/org/jboss/jbossts/txbridge/tests/inbound/client/TestService.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -22,7 +22,6 @@ > > import javax.jws.WebService; > import javax.jws.soap.SOAPBinding; >-import javax.xml.ws.WebServiceClient; > > /** > * Interface for a web service used by txbridge test cases. Client side version. >Index: txbridge/tests/src/test/resources/arquillian.xml >=================================================================== >--- txbridge/tests/src/test/resources/arquillian.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/src/test/resources/arquillian.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -4,7 +4,7 @@ > <container qualifier="jboss" default="true" mode="manual"> > <configuration> > <property name="javaVmArguments">${server.jvm.args}</property> >- <property name="serverConfig">../../docs/examples/configs/standalone-xts.xml</property> >+ <property name="serverConfig">standalone-xts.xml</property> > </configuration> > </container> > </arquillian> >\ No newline at end of file >Index: txbridge/tests/pom.xml >=================================================================== >--- txbridge/tests/pom.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/pom.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -6,12 +6,12 @@ > <modelVersion>4.0.0</modelVersion> > <groupId>org.jboss.jbossts</groupId> > <artifactId>txbridge-tests</artifactId> >- <version>4.16.4.Final</version> >+ <version>4.16.5.Final</version> > <packaging>jar</packaging> > > <properties> > <version.jbossas>7.1.1.Final</version.jbossas> >- <version.jbossts>4.16.4.Final</version.jbossts> >+ <version.jbossts>4.16.5.Final</version.jbossts> > <version.arquillian.junit>1.0.0.Final</version.arquillian.junit> > <version.junit>4.8.2</version.junit> > <version.byteman>2.0.1</version.byteman> >@@ -175,6 +175,7 @@ > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> >+ <version>2.11</version> > <configuration> > <!-- Prevent test and server output appearing in console. --> > <redirectTestOutputToFile>true</redirectTestOutputToFile> >Index: txbridge/tests/build.xml >=================================================================== >--- txbridge/tests/build.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ txbridge/tests/build.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -4,10 +4,10 @@ > > <import file="../../sharedbuild.xml"/> > >- <property name="jbossts.version" value="4.16.4.Final"/> >+ <property name="jbossts.version" value="4.16.5.Final"/> > <property name="groupid" value="org.jboss.jbossts"/> > <property name="jboss.home" value="/tmp/jboss-as-7.1.0-SNAPSHOT"/> >- <property name="standalone.xts.conf.path" value="${jboss.home}/docs/examples/configs/standalone-xts.xml"/> >+ <property name="standalone.xts.conf.path" value="${jboss.home}/standalone/configuration/standalone-xts.xml"/> > > <target name="clean"> > <mvn.macro> >@@ -86,7 +86,7 @@ > <if> > <os family="windows" /> > <then> >- <exec executable="mvn" dir="${basedir}" failonerror="true"> >+ <exec executable="cmd" dir="${basedir}" failonerror="true"> > <arg value="/c" /> > <arg value="mvn.bat" /> > <mvn.args /> > >Property changes on: txbridge/tests >___________________________________________________________________ >Modified: svn:ignore > - transaction.log >target > > + transaction.log >target >build > > >Index: build-release-pkgs.xml >=================================================================== >--- build-release-pkgs.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ build-release-pkgs.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -82,9 +82,9 @@ > <!-- where to get the source --> > <property name="svnbase" value="https://svn.jboss.org/repos/labs/labs/jbosstm/tags"/> > <!-- The tag as it appears under svnbase --> >- <property name="tag" value="JBOSSTS_4_16_4_Final"/> >+ <property name="tag" value="JBOSSTS_4_16_5_Final"/> > <!-- The file name base for the user downloadable files. Derive it from the tag --> >- <property name="filename" value="4.16.4.Final"/> >+ <property name="filename" value="4.16.5.Final"/> > <!-- the location the JBossTS web site content is copied to --> > <property name="downloads.dir" value="/home/tom/filemgmt.jboss.org/downloads_htdocs/jbosstm/"/> > <!-- the mvn repo to upload to --> >@@ -221,11 +221,7 @@ > </jar> > <mvn-artifact.macro artifact="jbossjts-integration" dir="${workdir}/build/${tag}/lib"/> > >- <!-- tools --> > >- <mvn-artifact.macro artifact="jbossts-jopr-plugin" packaging="jar" >- dir="${workdir}/build/${tag}/bin"/> >- > <!-- xts --> > > <delete dir="${workdir}/build"/> >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleParticipantCompletionParticipantCloseTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleParticipantCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleParticipantCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -146,7 +146,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("close failure " + exception); > } > >@@ -154,4 +153,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -158,7 +158,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -166,4 +165,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleCoordinatorCompletionParticipantCloseTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleCoordinatorCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleCoordinatorCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -120,7 +120,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -128,4 +127,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseAndExitTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseAndExitTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseAndExitTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -172,7 +172,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -180,4 +179,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -158,7 +158,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -166,4 +165,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -141,7 +141,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -149,4 +148,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -172,7 +172,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -180,4 +179,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -156,7 +156,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -164,4 +163,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -134,7 +134,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -142,4 +141,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseTest.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -148,7 +148,6 @@ > } > > if (exception != null) { >- exception.printStackTrace(); > error("commit failure " + exception); > } > >@@ -156,4 +155,4 @@ > > isSuccessful = (exception == null); > } >-} >+} >\ No newline at end of file >Index: XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/service/XTSServiceTestInterpreter.java >=================================================================== >--- XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/service/XTSServiceTestInterpreter.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/service/XTSServiceTestInterpreter.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -5,6 +5,9 @@ > import org.jboss.jbossts.xts.servicetests.generated.CommandsType; > import org.jboss.jbossts.xts.servicetests.generated.ResultsType; > >+import java.net.Inet6Address; >+import java.net.InetAddress; >+import java.net.UnknownHostException; > import java.util.HashMap; > import java.util.List; > import java.util.ArrayList; >@@ -173,9 +176,29 @@ > */ > public void addDefaultBinding(String var, String val) > { >+ val = replaceLocalhostIfIPv6AndUrl(val); > defaultBindings.put(var, val); > } > >+ public String replaceLocalhostIfIPv6AndUrl(String url) >+ { >+ if (isIPv6()) >+ { >+ url = url.replace("http://localhost", "http://[::1]"); >+ } >+ return url; >+ } >+ >+ private boolean isIPv6() { >+ try { >+ if (InetAddress.getLocalHost() instanceof Inet6Address || System.getenv("IPV6_OPTS") != null) >+ return true; >+ } catch (final UnknownHostException uhe) { >+ } >+ >+ return false; >+ } >+ > /// overrideable methods > > /** >Index: XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java >=================================================================== >--- XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,6 +1,19 @@ > package com.arjuna.qa.junit; > >+import java.io.BufferedReader; > import java.io.File; >+import java.io.FileInputStream; >+import java.io.FileOutputStream; >+import java.io.IOException; >+import java.io.InputStreamReader; >+import java.net.UnknownHostException; >+import java.net.Inet6Address; >+import java.net.InetAddress; >+import java.util.Arrays; >+import java.util.List; >+import java.util.logging.Logger; >+ >+import com.arjuna.qa.extension.JBossAS7ServerKillProcessor; > import org.jboss.arquillian.container.test.api.Config; > import org.jboss.arquillian.container.test.api.ContainerController; > import org.jboss.arquillian.container.test.api.Deployer; >@@ -17,8 +30,12 @@ > > public class BaseCrashTest > { >+ >+ private static final Logger logger = Logger.getLogger(BaseCrashTest.class.getName()); >+ > protected String XTSServiceTest = " -Dorg.jboss.jbossts.xts.servicetests.XTSServiceTestName=@TestName@"; > protected String BytemanArgs = "-Xms64m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.byteman.verbose -Djboss.modules.system.pkgs=org.jboss.byteman -Dorg.jboss.byteman.transform.all -javaagent:target/test-classes/lib/byteman.jar=script:target/test-classes/scripts/@BMScript@.txt,boot:target/test-classes/lib/byteman.jar,listener:true"; >+ protected String iPv6Args = "-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true -Djboss.bind.address=[::1] -Djboss.bind.address.management=[::1] -Djboss.bind.address.unsecure=[::1] "; > protected String javaVmArguments; > protected String testName; > protected String scriptName; >@@ -33,9 +50,9 @@ > public static Archive<?> createTestArchive() > { > WebArchive archive = ShrinkWrap. >- createFromZipFile(WebArchive.class, new File(xtstestWar)); >+ createFromZipFile(WebArchive.class, new File(xtstestWar)); > final String ManifestMF = "Manifest-Version: 1.0\n" >- + "Dependencies: org.jboss.modules,deployment.arquillian-service,org.jboss.msc,org.jboss.jts,org.jboss.xts\n"; >+ + "Dependencies: org.jboss.modules,deployment.arquillian-service,org.jboss.msc,org.jboss.jts,org.jboss.xts\n"; > archive.setManifest(new StringAsset(ManifestMF)); > > return archive; >@@ -44,8 +61,14 @@ > @Before > public void setUp() > { >- javaVmArguments = BytemanArgs.replace("@BMScript@", scriptName); >+ if (isIPv6()) >+ javaVmArguments = iPv6Args + BytemanArgs.replace("@BMScript@", scriptName); >+ else >+ javaVmArguments = BytemanArgs.replace("@BMScript@", scriptName); > >+ System.out.println("Starting arquillian with java VM args: " + >+ javaVmArguments + " isIPv6: " + isIPv6()); >+ > File file = new File("testlog"); > if (file.isFile() && file.exists()) > { >@@ -76,13 +99,62 @@ > System.out.println("remove tx-object-store: " + objectStore.getPath()); > } > } >+ //Remove the xts deployments under the content >+ File contentDir = new File(jbossHome + File.separator + "standalone" + File.separator + "data" + File.separator + "content"); >+ if(contentDir.exists()) >+ { >+ File[] files = contentDir.listFiles(); >+ if(files != null) >+ { >+ int i = 0; >+ for(i=0;i<files.length;i++) >+ { >+ if(files[i].isDirectory()) >+ { >+ deleteDirectory(files[i]); >+ System.out.println("remove " + files[i].getPath()); >+ } >+ } >+ } >+ } >+ >+ File exampleXTSconfig = new File(jbossHome + File.separator + "docs" + File.separator + "examples" + File.separator + "configs" + File.separator + "standalone-xts.xml"); >+ File XTSconfig = new File(jbossHome + File.separator + "standalone" + File.separator + "configuration" + File.separator + "standalone-xts.xml"); >+ if(exampleXTSconfig.exists()) >+ { >+ //copy example config to configuration directory >+ try { >+ FileInputStream in = new FileInputStream(exampleXTSconfig); >+ FileOutputStream out = new FileOutputStream(XTSconfig); >+ byte[] buffer = new byte[1024]; > >+ int length; >+ //copy the file content in bytes >+ while ((length = in.read(buffer)) > 0) >+ { >+ out.write(buffer, 0, length); >+ >+ } >+ >+ in.close(); >+ out.close(); >+ System.out.println("copy " + exampleXTSconfig.getPath() + " to " + XTSconfig.getPath()); >+ } >+ catch(IOException e) >+ { >+ Assert.fail("copy " + exampleXTSconfig.getPath() + " fail with " + e); >+ } >+ } >+ else >+ { >+ Assert.fail(exampleXTSconfig.getPath() + " not exists"); >+ } > } > } > > @After > public void tearDown() >- { >+ { > String log = "target/log"; > > String jbossHome = System.getenv().get("JBOSS_HOME"); >@@ -91,7 +163,12 @@ > } > String dir = jbossHome + "/standalone/data/tx-object-store/ShadowNoFileLockStore/defaultStore/XTS/"; > File objectStore = new File(dir); >- Assert.assertTrue(checkTxObjectStore(objectStore)); >+ boolean ischeck = checkTxObjectStore(objectStore); >+ if(!ischeck) { >+ StringBuffer buffer = exploreDirectory(objectStore, 0); >+ System.out.println(buffer); >+ } >+ Assert.assertTrue(ischeck); > > if (testName != null && scriptName != null) > { >@@ -113,13 +190,22 @@ > > protected void runTest(String testClass) throws Exception > { >+ logger.info("Test starting, server should be down: " + scriptName + ":" + testName); >+ > Config config = new Config(); >+ config.add("testClass", testClass); >+ config.add("scriptName", scriptName); > config.add("javaVmArguments", javaVmArguments + XTSServiceTest.replace("@TestName@", testClass)); > > controller.start("jboss-as", config.map()); >- //deployer.undeploy("xtstest"); >- deployer.deploy("xtstest"); > >+ try { >+ deployer.deploy("xtstest"); >+ } catch (java.lang.RuntimeException e) { >+ //JBTM-1236 it could be ignore this exception because the container might be killed already and JVM.kill() has happened. >+ System.out.println("jboss-as has been killed"); >+ } >+ > //Waiting for crashing > controller.kill("jboss-as"); > >@@ -127,16 +213,10 @@ > config.add("javaVmArguments", javaVmArguments); > controller.start("jboss-as", config.map()); > >- //redeploy xtstest >- //deployer.undeploy("xtstest"); >- //deployer.deploy("xtstest"); >+ //Waiting for recovery happening >+ controller.kill("jboss-as"); > >- //Waiting for recovery >- //Thread.sleep(waitForRecovery * 60 * 1000); >- >- //deployer.undeploy("xtstest"); >- //controller.stop("jboss-as"); >- controller.kill("jboss-as"); >+ logger.info("Test completed, server should be down: " + scriptName + ":" + testName); > } > > private boolean deleteDirectory(File path) >@@ -178,4 +258,63 @@ > } > return true; > } >+ >+ private static boolean isIPv6() { >+ try { >+ if (InetAddress.getLocalHost() instanceof Inet6Address || System.getenv("IPV6_OPTS") != null) >+ return true; >+ } catch (final UnknownHostException uhe) { >+ } >+ >+ return false; >+ } >+ >+ private StringBuffer exploreDirectory(File directory, int level) { >+ List<File> files = Arrays.asList(directory.listFiles()); >+ StringBuffer result = new StringBuffer(); >+ String NEWLINE = "\n"; >+ String FILE_GRAPHIC = "- "; >+ String DIRECTORY_GRAPHIC = "+- "; >+ >+ StringBuffer spaces = new StringBuffer(); >+ for (int i = 0; i < level; i++) { >+ spaces.append(" "); >+ } >+ >+ for (File cur : files) { >+ if (cur.isDirectory()) { >+ result.append(spaces + DIRECTORY_GRAPHIC + "["+ cur.getName() +"]" >+ + NEWLINE); >+ >+ List<File> afiles = Arrays.asList(cur.listFiles()); >+ for (File acur : afiles) { >+ if (acur.isFile()) { >+ result.append(" " + spaces + FILE_GRAPHIC + acur.getName() + NEWLINE); >+ try { >+ FileInputStream fis = new FileInputStream(acur); >+ InputStreamReader bis = new InputStreamReader(fis); >+ BufferedReader dis = new BufferedReader(bis); >+ >+ String s; >+ do { >+ s = dis.readLine(); >+ result.append(" " + spaces + s + NEWLINE); >+ }while(s != null); >+ >+ fis.close(); >+ bis.close(); >+ dis.close(); >+ } catch (IOException e) { >+ //ignore >+ } >+ >+ } >+ } >+ result.append(exploreDirectory(cur, level + 1)); >+ } else if(level == 0) { >+ result.append(spaces + FILE_GRAPHIC + cur.getName() + NEWLINE); >+ } >+ } >+ return result; >+ } > } >Index: XTS/sar/crash-recovery-tests/src/test/resources/arquillian.xml >=================================================================== >--- XTS/sar/crash-recovery-tests/src/test/resources/arquillian.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/crash-recovery-tests/src/test/resources/arquillian.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -12,7 +12,10 @@ > <property name="executionType">REMOTE</property> > </protocol> > <configuration> >- <property name="serverConfig">../../docs/examples/configs/standalone-xts.xml</property> >+ <property name="javaVmArguments">${server.jvm.args}</property> >+ <property name="serverConfig">standalone-xts.xml</property> >+ <property name="managementAddress">${node.address}</property> >+ > <!-- > <property name="javaVmArguments">-Djboss.modules.system.pkgs=org.jboss.byteman -Dorg.jboss.byteman.transform.all -javaagent:target/test-classes/lib/byteman.jar=script:target/test-classes/scripts/Running.txt,boot:target/test-classes/lib/byteman.jar,listener:true</property> > >Index: XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringComplete.txt >=================================================================== >--- XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringComplete.txt (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringComplete.txt (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -292,7 +292,7 @@ > AT ENTRY > IF TRUE > DO debug("creating counter and rendezvous"), >- createCounter("closes", 1), >+ createCounter("closes", 3), > createRendezvous("closes-complete", 2) > ENDRULE > >Index: XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java >=================================================================== >--- XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -1,93 +1,120 @@ > package com.arjuna.qa.extension; > >- >+import org.jboss.arquillian.container.spi.Container; >+import org.jboss.arquillian.container.spi.ServerKillProcessor; > import java.io.BufferedReader; >+import java.io.IOException; > import java.io.InputStream; > import java.io.InputStreamReader; >+import java.util.Map; > import java.util.logging.Logger; > >-import org.jboss.arquillian.container.spi.Container; >-import org.jboss.arquillian.container.spi.ServerKillProcessor; >- > public class JBossAS7ServerKillProcessor implements ServerKillProcessor { >- private final Logger log = Logger.getLogger( >- JBossAS7ServerKillProcessor.class.getName()); >- private static String killSequence = "[jbossHome]/bin/jboss-cli.[suffix] --commands=connect,quit"; >- private static String shutdownSequence = "[jbossHome]/bin/jboss-cli.[suffix] --connect command=:shutdown"; >- private int checkDurableTime = 10; >- private int numofCheck = 60; > >- @Override >- public void kill(Container container) throws Exception { >- log.info("waiting for byteman to kill server"); >- String jbossHome = System.getenv().get("JBOSS_HOME"); >- if(jbossHome == null) { >- jbossHome = container.getContainerConfiguration().getContainerProperties().get("jbossHome"); >- } >- killSequence = killSequence.replace("[jbossHome]", jbossHome); >- shutdownSequence = shutdownSequence.replace("[jbossHome]", jbossHome); >+ private static final Logger logger = Logger.getLogger(JBossAS7ServerKillProcessor.class.getName()); >+ private static final String CHECK_JBOSS_ALIVE_CMD = "if [ \"$(jps | grep jboss-modules.jar)\" == \"\" ]; then exit 1; fi"; >+ private static final String CHECK_FOR_DEFUNCT_JAVA_CMD = "if [ \"$(ps aux | grep '\\[java\\] <defunct>')\" == \"\" ]; then exit 1; fi"; >+ private static final String SHUTDOWN_JBOSS_CMD = "jps | grep jboss-modules.jar | awk '{ print $1 }' | xargs kill"; > >- String suffix; >- String os = System.getProperty("os.name").toLowerCase(); >- if(os.indexOf("windows") > -1) { >- suffix = "bat"; >- } else { >- suffix = "sh"; >- } >- killSequence = killSequence.replace("[suffix]", suffix); >- shutdownSequence = shutdownSequence.replace("[suffix]", suffix); >- >- int checkn = 0; >- boolean killed = false; >- do { >- if(checkJBossAlive()) { >- Thread.sleep(checkDurableTime * 1000); >- log.info("jboss-as is alive"); >- } else { >- killed = true; >- break; >- } >- checkn ++; >- } while(checkn < numofCheck); >- >- if(killed) { >- log.info("jboss-as killed by byteman scirpt"); >- } else { >- log.info("jboss-as not killed and shutdown"); >- Process p = Runtime.getRuntime().exec(shutdownSequence); >- p.waitFor(); >- p.destroy(); >- // wait 5 * 60 second for jboss-as shutdown complete >- int checkn_s = 0; >- do { >- if(checkJBossAlive()) { >- Thread.sleep(5000); >- } else { >- log.info("jboss-as shutdown"); >- break; >- } >- checkn_s ++; >- } while (checkn_s < 60); >- throw new RuntimeException("jboss-as not killed and shutdown"); >- } >- } >- >- private boolean checkJBossAlive() throws Exception { >- Process p = Runtime.getRuntime().exec(killSequence); >- p.waitFor(); >- int rc = p.exitValue(); >+ private int checkPeriodMillis = 10 * 1000; >+ private int numChecks = 60; > >- if (rc != 0 && rc != 1) { >- p.destroy(); >- throw new RuntimeException("Kill Sequence failed"); >- } >- >- InputStream out = p.getInputStream(); >- BufferedReader in = new BufferedReader(new InputStreamReader(out)); >- String result= in.readLine(); >- out.close(); >- p.destroy(); >- >- return !(result != null && result.contains("The controller is not available")); >- } >+ private static int processLogId = 0; >+ >+ @Override >+ public void kill(Container container) throws Exception { >+ logger.info("waiting for byteman to kill the server"); >+ >+ for (int i = 0; i < numChecks; i++) { >+ >+ if (jbossIsAlive()) { >+ Thread.sleep(checkPeriodMillis); >+ logger.info("jboss-as is still alive, sleeping for a further " + checkPeriodMillis + "ms"); >+ } else if (isDefunctJavaProcess()) { >+ logger.info("Found a defunct java process, sleeping for a further " + checkPeriodMillis + "ms"); >+ dumpProcesses(container); >+ } else { >+ logger.info("jboss-as killed by byteman scirpt"); >+ dumpProcesses(container); >+ return; >+ } >+ } >+ >+ //We've waited long enough for Byteman to kil the server and it has not yet done it. >+ // Kill the server manually and fail the test >+ shutdownJBoss(); >+ throw new RuntimeException("jboss-as was not killed by Byteman, this indicates a test failure"); >+ } >+ >+ private boolean jbossIsAlive() throws Exception { >+ int exitCode = runShellCommand(CHECK_JBOSS_ALIVE_CMD); >+ >+ //Command will 'exit 1' if jboss is not running and 'exit 0' if it is >+ return exitCode == 0; >+ } >+ >+ private boolean isDefunctJavaProcess() throws Exception { >+ int exitCode = runShellCommand(CHECK_FOR_DEFUNCT_JAVA_CMD); >+ >+ //Command will 'exit 1' if a defunct java process is not running and 'exit 0' if there is >+ return exitCode == 0; >+ } >+ >+ >+ private void shutdownJBoss() throws Exception { >+ runShellCommand(SHUTDOWN_JBOSS_CMD); >+ >+ // wait 5 * 60 second for jboss-as shutdown complete >+ for (int i = 0; i < 60; i++) { >+ >+ if (jbossIsAlive()) { >+ Thread.sleep(5000); >+ } else { >+ logger.info("jboss-as shutdown after sending shutdown command"); >+ return; >+ } >+ } >+ } >+ >+ private int runShellCommand(String cmd) throws Exception { >+ logger.info("Executing shell command: '" + cmd + "'"); >+ ProcessBuilder pb = new ProcessBuilder("/bin/sh", "-c", cmd); >+ Process p = pb.start(); >+ p.waitFor(); >+ >+ dumpStream("std out", p.getInputStream()); >+ dumpStream("std error", p.getErrorStream()); >+ >+ p.destroy(); >+ >+ return p.exitValue(); >+ } >+ >+ private void dumpStream(String msg, InputStream is) { >+ try { >+ BufferedReader ein = new BufferedReader(new InputStreamReader(is)); >+ String res = ein.readLine(); >+ is.close(); >+ if (res != null) >+ { >+ System.out.printf("%s %s\n", msg, res); >+ } >+ } catch (IOException e) { >+ logger.info("Exception dumping stream: " + e.getMessage()); >+ } >+ } >+ >+ public void dumpProcesses(Container container) throws Exception >+ { >+ Map<String, String> config = container.getContainerConfiguration().getContainerProperties(); >+ String testClass = config.get("testClass"); >+ String scriptName = config.get("scriptName"); >+ >+ String dir = "./target/surefire-reports/processes"; >+ runShellCommand("mkdir -p " + dir); >+ >+ String logFile = dir + "/" + scriptName + ":" + testClass + "_" + processLogId++ + ".txt"; >+ runShellCommand("ps aux > " + logFile); >+ logger.info("Logged current running processes to: " + logFile); >+ } > } >Index: XTS/sar/crash-recovery-tests/pom.xml >=================================================================== >--- XTS/sar/crash-recovery-tests/pom.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/sar/crash-recovery-tests/pom.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -4,105 +4,122 @@ > General Public License, v. 2.1. This program is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, v.2.1 along with this distribution; if not, write to the Free > Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --> >-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> >- <groupId>org.jboss.narayana.xts</groupId> >- <modelVersion>4.0.0</modelVersion> >- <artifactId>localjunit-crash-recovery-tests</artifactId> >- <packaging>jar</packaging> >- <name>xts crash recovery tests</name> >- <description>xts crash recovery tests</description> >- <version>5.0.0.M2-SNAPSHOT</version> >- <!-- >- <repositories> >- <repository> >- <id>jboss-public-repository</id> >- <name>JBoss Repository</name> >- <url>https://repository.jboss.org/nexus/content/groups/public</url> >- <releases> >- <enabled>true</enabled> >- </releases> >- <snapshots> >- <enabled>true</enabled> >- </snapshots> >- </repository> >- </repositories> >- --> >- <build> >- <plugins> >- <plugin> >- <artifactId>maven-compiler-plugin</artifactId> >- <version>2.3.1</version> >- <configuration> >- <source>1.6</source> >- <target>1.6</target> >- </configuration> >- </plugin> >- </plugins> >- </build> >- <dependencies> >- <dependency> >- <groupId>org.jboss.jbossts</groupId> >- <artifactId>jbossxts-api</artifactId> >- <version>4.16.4.Final</version> >- <scope>system</scope> >- <systemPath>${project.basedir}/../build/jbossxts-api.jar</systemPath> >- </dependency> >+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> >+ >+ <groupId>org.jboss.narayana.xts</groupId> >+ <modelVersion>4.0.0</modelVersion> >+ <artifactId>localjunit-crash-recovery-tests</artifactId> >+ <packaging>jar</packaging> >+ <name>xts crash recovery tests</name> >+ <description>xts crash recovery tests</description> >+ <version>4.16.5.Final</version> >+ >+ <properties> >+ <general.server.jvm.args>-Xms64m -Xmx1024m -XX:MaxPermSize=512m</general.server.jvm.args> >+ <ipv4.server.jvm.args></ipv4.server.jvm.args> >+ <ipv6.server.jvm.args>-Djboss.bind.address=[::1] -Djboss.bind.address.management=[::1] -Djboss.bind.address.unsecure=[::1] -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true</ipv6.server.jvm.args> >+ <server.debug.args>Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006</server.debug.args> >+ </properties> >+ >+ <dependencies> > <dependency> > <groupId>org.jboss.jbossts</groupId> >+ <artifactId>jbossxts-api</artifactId> >+ <version>4.16.5.Final</version> >+ <scope>system</scope> >+ <systemPath>${project.basedir}/../build/jbossxts-api.jar</systemPath> >+ </dependency> >+ <dependency> >+ <groupId>org.jboss.jbossts</groupId> > <artifactId>jbossjta</artifactId> >- <version>4.16.4.Final</version> >+ <version>4.16.5.Final</version> > <scope>system</scope> >- <systemPath>${project.basedir}/../../../ArjunaJTS/build/install/lib/jbossjts.jar</systemPath> >+ <systemPath>${project.basedir}/../../../ArjunaJTS/build/install/lib/jbossjts.jar</systemPath> > </dependency> >- <dependency> >- <groupId>junit</groupId> >- <artifactId>junit</artifactId> >- <version>4.8.1</version> >- <scope>compile</scope> >- </dependency> >- <dependency> >- <groupId>org.jboss.arquillian.junit</groupId> >- <artifactId>arquillian-junit-container</artifactId> >- <version>1.0.0.Final</version> >- <scope>compile</scope> >- </dependency> >- </dependencies> >- <profiles> >- <profile> >- <!-- The default profile skips all tests, though you can tune it >- to run just unit tests based on a custom pattern --> >- <!-- Seperate profiles are provided for running all tests, including >- Arquillian tests that execute in the specified container --> >- <id>default</id> >- <activation> >- <activeByDefault>true</activeByDefault> >- </activation> >- <build> >- <plugins> >- <plugin> >- <artifactId>maven-surefire-plugin</artifactId> >- <version>2.7.2</version> >- <configuration> >- <redirectTestOutputToFile>true</redirectTestOutputToFile> >- <skip>false</skip> >- </configuration> >- </plugin> >- </plugins> >- </build> >- <dependencies> >- <dependency> >- <groupId>org.jboss.as</groupId> >- <artifactId>jboss-as-arquillian-container-managed</artifactId> >- <version>7.1.2.Final-SNAPSHOT</version> >- <scope>test</scope> >- </dependency> >- <dependency> >- <groupId>org.jboss.as</groupId> >- <artifactId>jboss-as-controller-client</artifactId> >- <version>7.1.2.Final-SNAPSHOT</version> >- <scope>test</scope> >+ <dependency> >+ <groupId>junit</groupId> >+ <artifactId>junit</artifactId> >+ <version>4.8.1</version> >+ <scope>compile</scope> > </dependency> >- </dependencies> >- </profile> >- </profiles> >+ <dependency> >+ <groupId>org.jboss.arquillian.junit</groupId> >+ <artifactId>arquillian-junit-container</artifactId> >+ <version>1.0.0.Final</version> >+ <scope>compile</scope> >+ </dependency> >+ </dependencies> >+ <build> >+ <plugins> >+ <plugin> >+ <groupId>org.apache.maven.plugins</groupId> >+ <artifactId>maven-surefire-plugin</artifactId> >+ <version>2.9</version> >+ <configuration> >+ <forkMode>once</forkMode> >+ <workingDirectory>.</workingDirectory> >+ <runOrder>alphabetical</runOrder> >+ <redirectTestOutputToFile>true</redirectTestOutputToFile> >+ <inherited>true</inherited> >+ <includes> >+ <include>**/*.java</include> >+ </includes> >+ </configuration> >+ </plugin> >+ </plugins> >+ </build> >+ >+ <profiles> >+ <profile> >+ <id>arq</id> >+ <activation> >+ <activeByDefault>false</activeByDefault> >+ </activation> >+ <build> >+ <plugins> >+ <plugin> >+ <artifactId>maven-surefire-plugin</artifactId> >+ <configuration> >+ <systemPropertyVariables combine.children="append"> >+ <server.jvm.args>${general.server.jvm.args} ${ipv4.server.jvm.args}</server.jvm.args> >+ <node.address>127.0.0.1</node.address> >+ </systemPropertyVariables> >+ </configuration> >+ </plugin> >+ </plugins> >+ </build> >+ <dependencies> >+ <dependency> >+ <groupId>org.jboss.as</groupId> >+ <artifactId>jboss-as-arquillian-container-managed</artifactId> >+ <version>7.2.0.Alpha1-SNAPSHOT</version> >+ <scope>test</scope> >+ </dependency> >+ </dependencies> >+ </profile> >+ <profile> >+ <id>arqIPv6</id> >+ <activation> >+ <activeByDefault>true</activeByDefault> >+ </activation> >+ <build> >+ <plugins> >+ <plugin> >+ <artifactId>maven-surefire-plugin</artifactId> >+ <configuration> >+ <argLine>${ipv6.server.jvm.args}</argLine> >+ <environmentVariables> >+ <CLI_IPV6_OPTS>-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true</CLI_IPV6_OPTS> >+ </environmentVariables> >+ <systemPropertyVariables combine.children="append"> >+ <server.jvm.args>${general.server.jvm.args} ${ipv6.server.jvm.args}</server.jvm.args> >+ <node.address>[::1]</node.address> >+ </systemPropertyVariables> >+ </configuration> >+ </plugin> >+ </plugins> >+ </build> >+ </profile> >+ </profiles> > </project> >Index: XTS/docs/Transactions_XTS_Administration_And_Development_Guide/en-US/Book_Info.xml >=================================================================== >--- XTS/docs/Transactions_XTS_Administration_And_Development_Guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/docs/Transactions_XTS_Administration_And_Development_Guide/en-US/Book_Info.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -7,7 +7,7 @@ > <title>Transactions XTS Administration And Development Guide</title> > <subtitle>Using the XTS Module of &PRODUCT; to provide Web Services Transactions</subtitle> > <productname>JBoss Transactions</productname> >- <productnumber>4.16.4.Final</productnumber> >+ <productnumber>4.16.5.Final</productnumber> > <edition>0</edition> > <pubsnumber>0</pubsnumber> > <abstract> >Index: XTS/demo-test/src/test/java/org/jboss/jbossts/xts/demotest/XTSDemoTest.java >=================================================================== >--- XTS/demo-test/src/test/java/org/jboss/jbossts/xts/demotest/XTSDemoTest.java (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/demo-test/src/test/java/org/jboss/jbossts/xts/demotest/XTSDemoTest.java (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -21,13 +21,13 @@ > */ > package org.jboss.jbossts.xts.demotest; > >-import static org.jboss.arquillian.ajocado.Ajocado.elementPresent; >-import static org.jboss.arquillian.ajocado.Ajocado.name; >-import static org.jboss.arquillian.ajocado.Ajocado.waitForHttp; >-import static org.jboss.arquillian.ajocado.Ajocado.waitModel; >-import static org.jboss.arquillian.ajocado.Ajocado.xp; >+import static org.jboss.arquillian.ajocado.Graphene.elementPresent; >+import static org.jboss.arquillian.ajocado.Graphene.name; >+import static org.jboss.arquillian.ajocado.Graphene.waitForHttp; >+import static org.jboss.arquillian.ajocado.Graphene.waitModel; >+import static org.jboss.arquillian.ajocado.Graphene.xp; > >-import org.jboss.arquillian.ajocado.framework.AjaxSelenium; >+import org.jboss.arquillian.ajocado.framework.GrapheneSelenium; > import org.jboss.arquillian.ajocado.locator.NameLocator; > import org.jboss.arquillian.ajocado.locator.XPathLocator; > import org.jboss.arquillian.container.test.api.Deployment; >@@ -70,7 +70,7 @@ > > // load ajocado driver > @Drone >- AjaxSelenium driver; >+ GrapheneSelenium driver; > > // Load context path to the test > @ArquillianResource >Index: XTS/demo-test/src/test/resources/arquillian.xml >=================================================================== >--- XTS/demo-test/src/test/resources/arquillian.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/demo-test/src/test/resources/arquillian.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -3,10 +3,12 @@ > > <container qualifier="jboss" default="true"> > <configuration> >- <property name="serverConfig">../../docs/examples/configs/standalone-xts.xml</property> >+ <property name="serverConfig">standalone-xts.xml</property> >+ <property name="javaVmArguments">${server.jvm.args}</property> >+ <property name="managementAddress">${node0:127.0.0.1}</property> > </configuration> > </container> >- <extension qualifier="ajocado"> >+ <extension qualifier="graphene"> > <property name="seleniumTimeoutDefault">60000</property> > <property name="seleniumTimeoutGui">60000</property> > <property name="seleniumTimeoutAjax">60000</property> >Index: XTS/demo-test/pom.xml >=================================================================== >--- XTS/demo-test/pom.xml (.../JBOSSTS_4_16_4_Final) (revision 38202) >+++ XTS/demo-test/pom.xml (.../JBOSSTS_4_16_5_Final) (revision 38202) >@@ -11,19 +11,33 @@ > > <properties> > <version.jbossas>7.1.1.Final</version.jbossas> >- <version.arquillian.junit>1.0.0.Final</version.arquillian.junit> >- <version.arquillian.drone>1.0.0.Final</version.arquillian.drone> >- <version.arquillian.ajocado.junit>1.0.0.CR2</version.arquillian.ajocado.junit> >+ <version.org.jboss.arquillian>1.0.0.Final</version.org.jboss.arquillian> >+ <version.org.jboss.arquillian.drone>1.0.0.Final</version.org.jboss.arquillian.drone> >+ <version.org.jboss.arquillian.graphene>1.0.0.Final</version.org.jboss.arquillian.graphene> > <version.junit>4.8.2</version.junit> >+ >+ <jvm.args.ip>-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false</jvm.args.ip> >+ <jvm.args.ip.server>${jvm.args.ip}</jvm.args.ip.server> >+ <jvm.args.ip.client>${jvm.args.ip}</jvm.args.ip.client> >+ <node0>127.0.0.1</node0> >+ <surefire.forked.process.timeout>1200</surefire.forked.process.timeout> > </properties> > > <dependencyManagement> > <dependencies> >+ <!-- Arquillian Core dependencies --> >+ <dependency> >+ <groupId>org.jboss.arquillian</groupId> >+ <artifactId>arquillian-bom</artifactId> >+ <version>${version.org.jboss.arquillian}</version> >+ <type>pom</type> >+ <scope>import</scope> >+ </dependency> > <!-- Arquillian Drone dependencies and Selenium dependencies --> > <dependency> > <groupId>org.jboss.arquillian.extension</groupId> > <artifactId>arquillian-drone-bom</artifactId> >- <version>${version.arquillian.drone}</version> >+ <version>${version.org.jboss.arquillian.drone}</version> > <type>pom</type> > <scope>import</scope> > </dependency> >@@ -49,14 +63,14 @@ > <dependency> > <groupId>org.jboss.arquillian.junit</groupId> > <artifactId>arquillian-junit-container</artifactId> >- <version>${version.arquillian.junit}</version> >+ <version>${version.org.jboss.arquillian}</version> > <scope>test</scope> > </dependency> > > <dependency> >- <groupId>org.jboss.arquillian.ajocado</groupId> >- <artifactId>arquillian-ajocado-junit</artifactId> >- <version>${version.arquillian.ajocado.junit}</version> >+ <groupId>org.jboss.arquillian.graphene</groupId> >+ <artifactId>arquillian-graphene</artifactId> >+ <version>${version.org.jboss.arquillian.graphene}</version> > <type>pom</type> > <scope>test</scope> > </dependency> >@@ -119,6 +133,31 @@ > </filesets> > </configuration> > </plugin> >+ <plugin> >+ <groupId>org.apache.maven.plugins</groupId> >+ <artifactId>maven-surefire-plugin</artifactId> >+ <version>2.11</version> >+ <configuration> >+ <redirectTestOutputToFile>true</redirectTestOutputToFile> >+ <enableAssertions>true</enableAssertions> >+ <!--<workingDirectory>${basedir}/target/workdir</workingDirectory> <!– Work in submodule's own dir. –>--> >+ >+ <!-- Forked process timeout --> >+ <forkedProcessTimeoutInSeconds>${surefire.forked.process.timeout}</forkedProcessTimeoutInSeconds> >+ <!-- System properties to forked surefire JVM which runs clients. --> >+ <argLine>${jvm.args.ip.client}</argLine> >+ >+ <!-- System properties passed to test cases --> >+ <systemPropertyVariables> >+ <node0>${node0}</node0> >+ <!-- >+ Used in arquillian.xml - arguments for all JBoss AS instances. >+ System properties are duplicated here until ARQ-647 is implemented. >+ --> >+ <server.jvm.args>-Xmx512m -XX:MaxPermSize=128m ${jvm.args.ip.server} -Djboss.bind.address=${node0} -Djboss.bind.address.management=${node0}</server.jvm.args> >+ </systemPropertyVariables> >+ </configuration> >+ </plugin> > </plugins> > </build> > >@@ -137,5 +176,14 @@ > </dependency> > </dependencies> > </profile> >+ >+ <profile> >+ <id>ipv6</id> >+ <activation><property><name>ipv6</name></property></activation> >+ <properties> >+ <jvm.args.ip>-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true</jvm.args.ip> >+ <node0>[::1]</node0> >+ </properties> >+ </profile> > </profiles> > </project> > >Property changes on: XTS/demo-test >___________________________________________________________________ >Added: svn:ignore > + target > > > >Property changes on: . >___________________________________________________________________ >Modified: svn:ignore > - jboss-as >idl-compiler.* >build >.project >.classpath >install >bin > > + jboss-as >idl-compiler.* >build >.project >.classpath >install >bin >target > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 900933
:
681810
| 681811