mirror of https://github.com/apache/activemq.git
Fixed ItStillMarshallsTheSameTest
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418496 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7f0e13571f
commit
3a4f3d5bd9
|
@ -341,13 +341,9 @@
|
||||||
<!-- These are performance tests so take too long to run -->
|
<!-- These are performance tests so take too long to run -->
|
||||||
<exclude>**/perf/*</exclude>
|
<exclude>**/perf/*</exclude>
|
||||||
|
|
||||||
|
|
||||||
<!-- these tests don't always work when rendezvous can't work on the OSS -->
|
<!-- these tests don't always work when rendezvous can't work on the OSS -->
|
||||||
<exclude>**/RendezvousDiscoverTransportTest.*</exclude>
|
<exclude>**/RendezvousDiscoverTransportTest.*</exclude>
|
||||||
|
|
||||||
<!-- This test currently fails -->
|
|
||||||
<exclude>**/ItStillMarshallsTheSameTest.*</exclude>
|
|
||||||
|
|
||||||
<!-- Kaha in flux - removing tests -->
|
<!-- Kaha in flux - removing tests -->
|
||||||
<exclude>**/KahaXARecoveryBrokerTest.*</exclude>
|
<exclude>**/KahaXARecoveryBrokerTest.*</exclude>
|
||||||
<exclude>**/KahaRecoveryBrokerTest.*</exclude>
|
<exclude>**/KahaRecoveryBrokerTest.*</exclude>
|
||||||
|
|
|
@ -24,35 +24,19 @@ import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URI;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import org.apache.activemq.openwire.OpenWireFormat;
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
import junit.framework.Assert;
|
import junit.framework.Assert;
|
||||||
|
|
||||||
abstract public class DataFileGenerator extends Assert {
|
abstract public class DataFileGenerator extends Assert {
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(DataFileGenerator.class);
|
|
||||||
|
|
||||||
static final File moduleBaseDir;
|
static final File moduleBaseDir;
|
||||||
static final File controlDir;
|
static final File controlDir;
|
||||||
static final File classFileDir;
|
static final File classFileDir;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
File basedir=null;
|
moduleBaseDir = new File(System.getProperty("basedir", "."));
|
||||||
try {
|
|
||||||
URL resource = DataFileGenerator.class.getResource("DataFileGenerator.class");
|
|
||||||
URI baseURI = new URI(resource.toString()).resolve("../../../../..");
|
|
||||||
basedir = new File(baseURI).getCanonicalFile();
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
moduleBaseDir = basedir;
|
|
||||||
controlDir = new File(moduleBaseDir, "src/test/resources/openwire-control");
|
controlDir = new File(moduleBaseDir, "src/test/resources/openwire-control");
|
||||||
classFileDir = new File(moduleBaseDir, "src/test/java/org/apache/activemq/openwire");
|
classFileDir = new File(moduleBaseDir, "src/test/java/org/apache/activemq/openwire");
|
||||||
}
|
}
|
||||||
|
@ -69,7 +53,7 @@ abstract public class DataFileGenerator extends Assert {
|
||||||
* @throws IllegalAccessException
|
* @throws IllegalAccessException
|
||||||
*/
|
*/
|
||||||
public static ArrayList getAllDataFileGenerators() throws Exception{
|
public static ArrayList getAllDataFileGenerators() throws Exception{
|
||||||
log.info("Looking for generators in : "+classFileDir);
|
System.out.println("Looking for generators in : "+classFileDir);
|
||||||
ArrayList l = new ArrayList();
|
ArrayList l = new ArrayList();
|
||||||
File[] files = classFileDir.listFiles();
|
File[] files = classFileDir.listFiles();
|
||||||
for (int i = 0; files!=null && i < files.length; i++) {
|
for (int i = 0; files!=null && i < files.length; i++) {
|
||||||
|
@ -89,10 +73,10 @@ abstract public class DataFileGenerator extends Assert {
|
||||||
for (Iterator iter = generators.iterator(); iter.hasNext();) {
|
for (Iterator iter = generators.iterator(); iter.hasNext();) {
|
||||||
DataFileGenerator object = (DataFileGenerator) iter.next();
|
DataFileGenerator object = (DataFileGenerator) iter.next();
|
||||||
try {
|
try {
|
||||||
log.info("Processing: "+object.getClass());
|
System.out.println("Processing: "+object.getClass());
|
||||||
object.generateControlFile();
|
object.generateControlFile();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Error while processing: "+object.getClass() + ". Reason: " + e, e);
|
System.err.println("Error while processing: "+object.getClass() + ". Reason: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,7 +114,7 @@ abstract public class DataFileGenerator extends Assert {
|
||||||
ArrayList generators = getAllDataFileGenerators();
|
ArrayList generators = getAllDataFileGenerators();
|
||||||
for (Iterator iter = generators.iterator(); iter.hasNext();) {
|
for (Iterator iter = generators.iterator(); iter.hasNext();) {
|
||||||
DataFileGenerator object = (DataFileGenerator) iter.next();
|
DataFileGenerator object = (DataFileGenerator) iter.next();
|
||||||
log.info("Processing: "+object.getClass());
|
System.out.println("Processing: "+object.getClass());
|
||||||
object.assertControlFileIsEqual();
|
object.assertControlFileIsEqual();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue