Test to drop secondary indexes

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@1173 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/drop-empty-secondary-indexes.aql b/asterix-app/src/test/resources/runtimets/queries/dml/drop-empty-secondary-indexes.aql
new file mode 100644
index 0000000..8b53f1e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/drop-empty-secondary-indexes.aql
@@ -0,0 +1,35 @@
+/*
+ * Description     : Drop empty secondary index.
+ * Expected Result : Success
+ * Date            : 8th Feb 2013
+ *
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as open {
+id : int32,
+name : string,
+locn : point,
+zip : string
+}
+
+create dataset t1(TestType) partitioned by key id;
+
+create index rtree_index_point on t1(locn) type rtree;
+
+create index keyWD_indx on t1(name) type keyword;
+
+create index secndIndx on t1(zip);
+
+drop index t1.rtree_index_point;
+
+drop index t1.keyWD_indx;
+
+drop index t1.secndIndx;
+
+for $l in dataset('Metadata.Index')
+where $l.IsPrimary=false
+return $l;
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/drop-empty-secondary-indexes.adm b/asterix-app/src/test/resources/runtimets/results/dml/drop-empty-secondary-indexes.adm
new file mode 100644
index 0000000..9b49756
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/dml/drop-empty-secondary-indexes.adm
@@ -0,0 +1,3 @@
+{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "DatatypeName", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatatypeName", "DatasetName" ], "IsPrimary": false, "Timestamp": "Fri Feb 08 17:57:01 PST 2013" }
+{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "GroupName", "IndexStructure": "BTREE", "SearchKey": [ "GroupName", "DataverseName", "DatasetName" ], "IsPrimary": false, "Timestamp": "Fri Feb 08 17:57:01 PST 2013" }
+{ "DataverseName": "Metadata", "DatasetName": "Datatype", "IndexName": "DatatypeName", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "NestedDatatypeName", "TopDatatypeName" ], "IsPrimary": false, "Timestamp": "Fri Feb 08 17:57:01 PST 2013" }
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 9ae7c60..c117eba 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -754,8 +754,8 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
-      <compilation-unit name="drop-index">
-        <output-file compare="Text">drop-index.adm</output-file>
+      <compilation-unit name="drop-empty-secondary-indexes">
+        <output-file compare="Text">drop-empty-secondary-indexes.adm</output-file>
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">