diff -Naur jboss-jts-4.16.2.Final/ArjunaCore/arjuna/build.xml jboss-jts-4.16.2.Final-work/ArjunaCore/arjuna/build.xml --- jboss-jts-4.16.2.Final/ArjunaCore/arjuna/build.xml 2011-04-21 12:07:58.000000000 +0200 +++ jboss-jts-4.16.2.Final-work/ArjunaCore/arjuna/build.xml 2012-08-30 14:40:00.935998201 +0200 @@ -104,25 +104,6 @@ </fileset> </tests> </run.tests.macro> - <!-- reaper tests run using script reaper.txt --> - <run.tests.macro> - <tests> - <fileset dir="tests/classes"> - <include name="**/reaper/ReaperMonitorTest.java"/> - <include name="**/reaper/ReaperTestCase.java"/> - <include name="**/reaper/ReaperTestCase2.java"/> - <include name="**/reaper/ReaperTestCase3.java"/> - </fileset> - </tests> - - <!--<additional.jvmargs>--> - <!--<jvmarg value="-Dorg.jboss.byteman.dump.generated.classes"/>--> - <!--<jvmarg value="-Dorg.jboss.byteman.dump.generated.classes.directory=dump"/>--> - <!--<jvmarg value="-Xdebug"/>--> - <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>--> - <!--</additional.jvmargs>--> - - </run.tests.macro> <!-- object store tests run using script objectstore.txt --> <run.tests.macro> <tests> diff -Naur jboss-jts-4.16.2.Final/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoveryManagerStartStopTest.java jboss-jts-4.16.2.Final-work/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoveryManagerStartStopTest.java --- jboss-jts-4.16.2.Final/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoveryManagerStartStopTest.java 2012-01-19 08:36:02.000000000 +0100 +++ jboss-jts-4.16.2.Final-work/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoveryManagerStartStopTest.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,259 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2006, Red Hat Middleware LLC, and individual contributors - * as indicated by the @author tags. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser 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. - * - * (C) 2009, - * @author JBoss Inc. - */ - -package com.hp.mwtests.ts.arjuna.recovery; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.InetAddress; -import java.net.Socket; -import java.net.SocketException; -import java.util.ArrayList; -import java.util.List; - -import org.jboss.byteman.contrib.bmunit.BMScript; -import org.jboss.byteman.contrib.bmunit.BMUnitRunner; -import org.junit.Test; -import org.junit.runner.RunWith; - -import com.arjuna.ats.arjuna.common.recoveryPropertyManager; -import com.arjuna.ats.arjuna.recovery.RecoveryManager; - -/** - * test to ensure that the recovery manager cleans up all its threads when terminated - */ - -@RunWith(BMUnitRunner.class) -@BMScript("recovery") -public class RecoveryManagerStartStopTest -{ - @Test - public void testStartStop() throws Exception - { - recoveryPropertyManager.getRecoveryEnvironmentBean().setRecoveryPort(4712); - - // check how many threads there are running - - ThreadGroup thg = Thread.currentThread().getThreadGroup(); - int activeCount = thg.activeCount(); - - dumpThreadGroup(thg, "Before recovery manager create"); - - RecoveryManager.delayRecoveryManagerThread(); - RecoveryManager manager = RecoveryManager.manager(RecoveryManager.INDIRECT_MANAGEMENT); - - dumpThreadGroup(thg, "Before recovery manager initialize"); - - manager.initialize(); - - dumpThreadGroup(thg, "Before recovery manager start periodic recovery thread"); - - manager.startRecoveryManagerThread(); - - dumpThreadGroup(thg, "Before recovery manager client create"); - - // Thread.sleep(1000); - - // we need to open several connections to the recovery manager listener service and then - // ensure they get closed down - - addRecoveryClient(); - addRecoveryClient(); - - dumpThreadGroup(thg, "Before recovery manager terminate"); - - manager.terminate(); - - // ensure the client threads get killed - - ensureRecoveryClientsTerminated(); - - dumpThreadGroup(thg, "After recovery manager terminate"); - - int newActiveCount = thg.activeCount(); - - assertEquals(activeCount, newActiveCount); - } - - private void ensureRecoveryClientsTerminated() - { - // check that any threads added to talk to the recovery listener get their sockets closed - - for (RecoveryManagerStartStopTestThread client : clients) { - try { - client.join(); - } catch (InterruptedException e) { - // do nothing - } - assertFalse(client.failed()); - } - } - - private void addRecoveryClient() - { - // open a connection to the recovery listener service in a new thread and ensure that the - // thread is terminated by having its socket closed. - - RecoveryManagerStartStopTestThread client = new RecoveryManagerStartStopTestThread(); - clients.add(client); - client.start(); - client.ensureStarted(); - } - - private void dumpThreadGroup(ThreadGroup thg, String header) - { - int activeCount = thg.activeCount(); - Thread[] threads = new Thread[activeCount]; - int reported = thg.enumerate(threads); - - System.out.println(header); - System.out.println("Thread count == " + activeCount); - for (int i = 0; i < reported; i++) { - System.out.println("Thread[" + i + "] == " + threads[i].getName()); - } - - System.out.flush(); - } - - private List<RecoveryManagerStartStopTestThread> clients = new ArrayList<RecoveryManagerStartStopTestThread>(); - - private static class RecoveryManagerStartStopTestThread extends Thread - { - private boolean failed = true; - private boolean started = false; - private boolean stopped = false; - - public RecoveryManagerStartStopTestThread() - { - super("Recovery Listener Client"); - } - - public boolean failed() - { - return failed; - } - - public void run() - { - BufferedReader fromServer = null; - Socket connectorSocket = null; - // get a socket connected to the listener - // don't write anything just sit on a read until the socket is closed - try { - String host; - int port; - - host = InetAddress.getLocalHost().getHostName(); - - port = recoveryPropertyManager.getRecoveryEnvironmentBean().getRecoveryPort(); - - System.out.println("client atempting to connect to host " + host + " port " + port); - System.out.flush(); - - try - { - connectorSocket = new Socket(host, port); - } - catch (final Exception ex) - { - // in case local host name bind fails (e.g., on Mac OS) - - host = "127.0.0.1"; - - connectorSocket = new Socket(host, port); - } - - System.out.println("connected!!!"); - System.out.flush(); - - fromServer = new BufferedReader(new InputStreamReader(connectorSocket.getInputStream())); - } catch (Exception e) { - - System.out.println("Failed to set up listener input stream!!!"); - e.printStackTrace(); - System.out.flush(); - - return; - } finally { - notifyStarted(); - } - - try { - String result = fromServer.readLine(); - if (result == null || result.equals("")) { - System.out.println("Recovery Listener Client got empty string from readline() as expected"); - System.out.flush(); - failed = false; - } - } catch (SocketException e) { - if (!connectorSocket.isClosed()) { - try { - connectorSocket.close(); - } catch (IOException e1) { - // ignore - } - } - System.out.println("Recovery Listener Client got socket exception as expected"); - e.printStackTrace(); - System.out.flush(); - failed = false; - } catch (IOException e) { - if (!connectorSocket.isClosed()) { - System.out.println("Recovery Listener Client got non socket IO exception without socket being closed"); - try { - connectorSocket.close(); - } catch (IOException e1) { - // ignore - } - } else { - System.out.println("Recovery Listener Client got IO exception under readline() as expected"); - failed = false; - } - e.printStackTrace(); - System.out.flush(); - } catch (Exception e) { - System.out.println("Recovery Listener Client got non IO exception"); - e.printStackTrace(); - System.out.flush(); - } - } - - public synchronized void notifyStarted() - { - started = true; - notify(); - } - - public synchronized void ensureStarted() { - while (!started) { - try { - wait(); - } catch (InterruptedException e) { - // ignore - } - } - } - } -} diff -Naur jboss-jts-4.16.2.Final/ArjunaJTA/build.xml jboss-jts-4.16.2.Final-work/ArjunaJTA/build.xml --- jboss-jts-4.16.2.Final/ArjunaJTA/build.xml 2011-04-15 15:31:46.000000000 +0200 +++ jboss-jts-4.16.2.Final-work/ArjunaJTA/build.xml 2012-08-30 14:40:00.937998316 +0200 @@ -26,7 +26,7 @@ <property name="component-module-list" value="../common,../ArjunaCore/arjuna,../ArjunaCore/txoj,jta,jdbc"/> - <target name="dist" depends="dist.compositenode, install.docs, install.scripts, install.services, install.etc"> + <target name="dist" depends="dist.compositenode, install.scripts, install.services, install.etc"> <copy file="INSTALL" todir="${build.dir}/install"/> </target> diff -Naur jboss-jts-4.16.2.Final/ArjunaJTS/build.xml jboss-jts-4.16.2.Final-work/ArjunaJTS/build.xml --- jboss-jts-4.16.2.Final/ArjunaJTS/build.xml 2011-04-14 11:18:36.000000000 +0200 +++ jboss-jts-4.16.2.Final-work/ArjunaJTS/build.xml 2012-08-30 15:02:04.634000117 +0200 @@ -37,7 +37,7 @@ <property name="component-module-list" value="../common,../ArjunaCore/arjuna,../ArjunaCore/txoj,../ArjunaJTA/jta,../ArjunaJTA/jdbc,orbportability,jts,jtax"/> - <target name="dist" depends="dist.compositenode, install.docs, install.scripts, install.services, install.etc, install.jacorb, install.trailmap, install.idl"> + <target name="dist" depends="dist.compositenode, install.scripts, install.services, install.etc, install.jacorb, install.trailmap, install.idl"> <copy file="INSTALL" todir="${build.dir}/install"/> </target> diff -Naur jboss-jts-4.16.2.Final/atsintegration/build.xml jboss-jts-4.16.2.Final-work/atsintegration/build.xml --- jboss-jts-4.16.2.Final/atsintegration/build.xml 2011-12-15 15:39:33.000000000 +0100 +++ jboss-jts-4.16.2.Final-work/atsintegration/build.xml 2012-08-30 17:00:00.792000013 +0200 @@ -81,7 +81,6 @@ <run.tests.macro showoutput="true"> <tests> <fileset dir="tests/classes"> - <include name="**/SimpleIsolatedServers.java"/> <include name="**/TestXAResourceRecordWrapperImpl.java"/> </fileset> </tests> diff -Naur jboss-jts-4.16.2.Final/build.xml jboss-jts-4.16.2.Final-work/build.xml --- jboss-jts-4.16.2.Final/build.xml 2012-01-23 16:43:39.000000000 +0100 +++ jboss-jts-4.16.2.Final-work/build.xml 2012-09-18 13:31:46.641999387 +0200 @@ -54,19 +54,16 @@ <target name="jts" depends="clean, init_dependencies, antbuildsystem"> <ant dir="ArjunaJTS"/> <install.macro src.module="ArjunaJTS"/> - <ant dir="qa"/> </target> <target name="jta" depends="clean, init_dependencies, antbuildsystem"> <ant dir="ArjunaJTA"/> <install.macro src.module="ArjunaJTA"/> - <ant dir="qa"/> </target> <target name="core" depends="clean, init_dependencies, antbuildsystem"> <ant dir="ArjunaCore"/> <install.macro src.module="ArjunaCore"/> - <ant dir="qa"/> </target> <macrodef name="atsinstall.macro"> @@ -92,7 +89,6 @@ <target name="jbossall" depends="jbossjts"> <ant dir="XTS" target="clean"/> <ant dir="XTS" target="install"/> - <ant dir="rhq-plugin" target="dist"/> <ant dir="txbridge" target="clean"/> <ant dir="txbridge" target="dist"/> <ant dir="docs" target="install.docs"> diff -Naur jboss-jts-4.16.2.Final/maven/build.xml jboss-jts-4.16.2.Final-work/maven/build.xml --- jboss-jts-4.16.2.Final/maven/build.xml 2011-10-06 23:40:46.000000000 +0200 +++ jboss-jts-4.16.2.Final-work/maven/build.xml 2012-08-30 14:40:00.940998478 +0200 @@ -96,14 +96,11 @@ <os family="unix" /> </condition> - <antcall target="maven-unix"/> - <antcall target="maven-windows"/> - <copy todir="${ext.lib.dest}" overwrite="true"> <fileset dir="${ext.lib.src}"> <include name="third_party_licenses.txt"/> <!-- we need a patched version of emma, see JBTM-682 --> - <include name="emma.jar"/> + <include name="*.jar"/> </fileset> </copy> diff -Naur jboss-jts-4.16.2.Final/txbridge/build.xml jboss-jts-4.16.2.Final-work/txbridge/build.xml --- jboss-jts-4.16.2.Final/txbridge/build.xml 2011-10-06 15:50:38.000000000 +0200 +++ jboss-jts-4.16.2.Final-work/txbridge/build.xml 2012-09-18 11:18:30.507994436 +0200 @@ -116,8 +116,6 @@ <copy file="${build}/txbridge.jar" tofile="${jbossts.home}/install/txbridge/jbosstxbridge.jar"/> <copy file="${build}/txbridge-src.jar" tofile="${jbossts.home}/install/txbridge/jbosstxbridge-sources.jar"/> - <ant dir="demo" target="dist" inheritall="false" inheritrefs="false"/> - <ant dir="tests" target="dist" inheritall="false" inheritrefs="false"/> </target>