[jboss-cvs] JBossAS SVN: r103997 - in projects/scanning/trunk: testsuite/src/test/java/org/jboss/test/scanning/indexer/test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 15 09:40:39 EDT 2010
Author: alesj
Date: 2010-04-15 09:40:37 -0400 (Thu, 15 Apr 2010)
New Revision: 103997
Modified:
projects/scanning/trunk/indexer/src/main/java/org/jboss/scanning/indexer/core/ScanUtils.java
projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/indexer/test/IndexerSmokeTestCase.java
Log:
More tests.
Modified: projects/scanning/trunk/indexer/src/main/java/org/jboss/scanning/indexer/core/ScanUtils.java
===================================================================
--- projects/scanning/trunk/indexer/src/main/java/org/jboss/scanning/indexer/core/ScanUtils.java 2010-04-15 13:24:41 UTC (rev 103996)
+++ projects/scanning/trunk/indexer/src/main/java/org/jboss/scanning/indexer/core/ScanUtils.java 2010-04-15 13:40:37 UTC (rev 103997)
@@ -103,7 +103,7 @@
{
File destination = new File(jar, Scanner.PREFIX);
store(destination, handles);
- File output = new File(input.getName() + Scanner.SUFFIX);
+ File output = new File(input.getParent(), input.getName() + Scanner.SUFFIX);
FileUtil.compress(jar, output);
return output;
}
Modified: projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/indexer/test/IndexerSmokeTestCase.java
===================================================================
--- projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/indexer/test/IndexerSmokeTestCase.java 2010-04-15 13:24:41 UTC (rev 103996)
+++ projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/indexer/test/IndexerSmokeTestCase.java 2010-04-15 13:40:37 UTC (rev 103997)
@@ -29,6 +29,9 @@
import org.jboss.scanning.indexer.Constants;
import org.jboss.scanning.indexer.core.ScanUtils;
import org.jboss.test.BaseTestCase;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.util.automount.Automounter;
import junit.framework.Test;
@@ -53,6 +56,26 @@
File input = new File(url.toURI());
Set<String> providers = Constants.applyAliases("@", "h");
File output = ScanUtils.scan(input, providers);
- assertTrue(output.delete());
+ assertTrue(output.exists());
+ try
+ {
+ VirtualFile file = VFS.getChild(output.toURI());
+ Automounter.mount(file);
+ try
+ {
+ VirtualFile h = file.getChild("META-INF/HierarchyIndex.mcs");
+ assertTrue(h.exists());
+ VirtualFile a = file.getChild("META-INF/AnnotationIndex.mcs");
+ assertTrue(a.exists());
+ }
+ finally
+ {
+ Automounter.cleanup(file);
+ }
+ }
+ finally
+ {
+ assertTrue(output.delete());
+ }
}
}
More information about the jboss-cvs-commits
mailing list