diff options
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/MainTest.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/java/MainTest.java b/src/test/java/MainTest.java index ce15527..c292df9 100644 --- a/src/test/java/MainTest.java +++ b/src/test/java/MainTest.java @@ -36,6 +36,7 @@ public class MainTest { String bootItems = FileStringUtility.url2String(Resource.getKernelResourceURL("boot/allbootitems.txt"));
StringTokenizer str = new StringTokenizer(bootItems, "\n\r");
+ long castorTime=0;
while (str.hasMoreTokens()) {
String thisItem = str.nextToken();
Logger.msg(1, "Validating "+thisItem);
@@ -50,11 +51,15 @@ public class MainTest { }
assert errors.length()==0;
- if (itemType.equals("CA") && !itemType.equals("EA")) {
+ if (itemType.equals("CA") || itemType.equals("EA")) {
Logger.msg(1, "Remarshalling "+thisItem);
+ long then = System.currentTimeMillis();
Object unmarshalled = Gateway.getMarshaller().unmarshall(data);
assert unmarshalled!=null;
String remarshalled = Gateway.getMarshaller().marshall(unmarshalled);
+ long now = System.currentTimeMillis();
+ Logger.msg("Marshall/remarshall of "+thisItem+" took "+(now-then)+"ms");
+ castorTime+=(now-then);
errors = validator.validate(remarshalled);
if (errors.length() > 0) {
Logger.error("Remarshalled resource "+thisItem+" has errors :"+errors);
@@ -70,6 +75,7 @@ public class MainTest { // assert xmlDiff.identical();
}
}
+ Logger.msg("Total Castor marshall time: "+castorTime+"ms");
}
private static Schema getSchema(String name, int version, String resPath) throws ObjectNotFoundException {
|
