Add test for issue 610 - handle correctly end_record and end_unordered_list tokens in adm format.
diff --git a/asterix-app/data/adm-load/double_end_record_token.adm b/asterix-app/data/adm-load/double_end_record_token.adm
new file mode 100644
index 0000000..032901f
--- /dev/null
+++ b/asterix-app/data/adm-load/double_end_record_token.adm
@@ -0,0 +1,5 @@
+{
+    "id": 1,
+    "nest_rec": {
+        "id": 2
+}}
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/issue610_adm_token_end_collection/issue610_adm_token_end_collection.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/load/issue610_adm_token_end_collection/issue610_adm_token_end_collection.1.ddl.aql
new file mode 100644
index 0000000..35e93559
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/load/issue610_adm_token_end_collection/issue610_adm_token_end_collection.1.ddl.aql
@@ -0,0 +1,21 @@
+/*
+ * Description  : Load dataset with two consecutive end_record token and correctly recognize them.
+ * Expected Res : Success
+ * Date         : 30 Oct 2013
+ */
+
+drop dataverse foo if exists;
+create dataverse foo;
+use dataverse foo;
+
+create type bartype as open {
+id: int32,
+nest_rec: {
+id: int32
+}
+}
+
+create dataset baz(bartype) primary key id;
+
+load dataset baz
+using localfs(("path"="nc1://data/double_end_record_token.adm"), ("format"="adm"));
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/load/issue610_adm_token_end_collection/issue610_adm_token_end_collection.1.adm b/asterix-app/src/test/resources/runtimets/results/load/issue610_adm_token_end_collection/issue610_adm_token_end_collection.1.adm
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/load/issue610_adm_token_end_collection/issue610_adm_token_end_collection.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 7f68e22..a409981 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -4349,6 +4349,11 @@
         <expected-error>edu.uci.ics.hyracks.api.exceptions.HyracksException</expected-error> 
       </compilation-unit>
     </test-case>
+    <test-case FilePath="load">
+      <compilation-unit name="issue610_adm_token_end_collection">
+        <output-dir compare="Text">issue610_adm_token_end_collection</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="hints">
     <test-case FilePath="hints">