added materialization step before an insert and a scan/join of the same dataset.
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.1.ddl.aql
index 00ef625..fc04212 100644
--- a/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.1.ddl.aql
@@ -1,7 +1,7 @@
 /* 
  * Test case Name  : insert-and-scan-dataset.aql
  * Description     : This test is intended to test inserting into a dataset and scan it at the same time
- * to make sure there is no deadlatch
+ * where we insert a materializing to prevent the possibility of deadlatch.
  * Expected Result : Success
  * Date            : July 11 2013
  */
@@ -12,11 +12,8 @@
 use dataverse test;
 
 create type myDataType as open {
-  id: int32,
-  id2: int32
+  id: int32
 }
 
 create dataset myData(myDataType)
   primary key id;
-
-create index idx_LineID_partkey on myData(id2);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.2.update.aql
index 3217ca9..58e0c38 100644
--- a/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.2.update.aql
@@ -1,28 +1,21 @@
 /* 
  * Test case Name  : insert-and-scan-dataset.aql
  * Description     : This test is intended to test inserting into a dataset and scan it at the same time
- * to make sure there is no deadlatch
+ * where we insert a materializing to prevent the possibility of deadlatch.
  * Expected Result : Success
  * Date            : July 11 2013
  */
  
 use dataverse test;
 
-/*
 load dataset myData 
 using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
 (("path"="nc1://data/odd-numbers.adm"),("format"="adm"))pre-sorted;
-*/
+
 
 insert into dataset myData (
-{"id":100, "id2":200}
-);
-
-/*insert into dataset myData (
 for $x in dataset myData
 return {
 	"id": $x.id + 1
 }
-);*/
-
-
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.3.query.aql
index ca8e4b2..f9af922 100644
--- a/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/insert-and-scan-dataset/insert-and-scan-dataset.3.query.aql
@@ -1,7 +1,7 @@
 /* 
  * Test case Name  : insert-and-scan-dataset.aql
  * Description     : This test is intended to test inserting into a dataset and scan it at the same time
- * to make sure there is no deadlatch
+ * where we insert a materializing to prevent the possibility of deadlatch.
  * Expected Result : Success
  * Date            : July 11 2013
  */
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 1e65071..5c56084 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -965,8 +965,8 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
-      <compilation-unit name="insert-into-empty-dataset-with-index">
-        <output-dir compare="Text">insert-into-empty-dataset-with-index</output-dir>
+      <compilation-unit name="insert-into-empty-dataset">
+        <output-dir compare="Text">insert-into-empty-dataset</output-dir>
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
@@ -980,6 +980,21 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
+      <compilation-unit name="insert-and-scan-dataset">
+        <output-dir compare="Text">insert-and-scan-dataset</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="dml">
+      <compilation-unit name="insert-and-scan-dataset-with-index">
+        <output-dir compare="Text">insert-and-scan-dataset-with-index</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="dml">
+      <compilation-unit name="insert-and-scan-joined-datasets">
+        <output-dir compare="Text">insert-and-scan-joined-datasets</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="dml">
       <compilation-unit name="insert-into-loaded-dataset-with-index_01">
         <output-dir compare="Text">insert-into-loaded-dataset-with-index_01</output-dir>
       </compilation-unit>