merged r1393:1404 asterix_stabilization --> asterix_lsm_stabilization
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_lsm_stabilization@1406 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java b/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
index 74c47ac..d1818ff 100644
--- a/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
+++ b/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
@@ -55,9 +55,17 @@
String fileNames[] = path.list();
for (String fName : fileNames) {
+ if (fName.startsWith(".")) {
+ continue;
+ }
+
File testFile = new File(path, fName);
TestFileContext tfsc = new TestFileContext(testFile);
String[] nameSplits = fName.split("\\.");
+ if (nameSplits.length < 3) {
+ throw new IllegalArgumentException("Test file '" + cUnit.getName() + File.separatorChar
+ + fName + "' does not have the proper test file name format.");
+ }
tfsc.setSeqNum(nameSplits[nameSplits.length - 3]);
tfsc.setType(nameSplits[nameSplits.length - 2]);
testFileCtxs.add(tfsc);
@@ -78,9 +86,19 @@
if (fileNames != null) {
for (String fName : fileNames) {
+ if (fName.startsWith(".")) {
+ continue;
+ }
+
File testFile = new File(path, fName);
TestFileContext tfsc = new TestFileContext(testFile);
String[] nameSplits = fName.split("\\.");
+
+ if (nameSplits.length < 3) {
+ throw new IllegalArgumentException("Test file '" + cUnit.getName() + File.separatorChar
+ + fName + "' does not have the proper test file name format.");
+ }
+
tfsc.setSeqNum(nameSplits[nameSplits.length - 2]);
resultFileCtxs.add(tfsc);
}