add test code

git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_genomix@3282 123451ca-8445-de46-9d55-352943316053
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/pregelix/JobGen/JobGenerator.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/pregelix/JobGen/JobGenerator.java
index 325ebdb..90e3892 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/pregelix/JobGen/JobGenerator.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/pregelix/JobGen/JobGenerator.java
@@ -47,7 +47,7 @@
     
     private static void generateBinaryLoadGraphJob(String jobName, String outputPath) throws IOException {
     	PregelixJob job = new PregelixJob(jobName);
-    	job.setVertexClass(MergeGraphVertex.class);
+    	job.setVertexClass(TestLoadGraphVertex.class);
     	job.setVertexInputFormatClass(BinaryLoadGraphInputFormat.class);
         job.setVertexOutputFormatClass(BinaryLoadGraphOutputFormat.class);
         job.setOutputKeyClass(BytesWritable.class);
@@ -61,6 +61,22 @@
     	generateBinaryLoadGraphJob("BinaryLoadGraph", outputBase + "BinaryLoadGraph.xml");
     }
     
+    private static void generateMergeGraphJob(String jobName, String outputPath) throws IOException {
+    	PregelixJob job = new PregelixJob(jobName);
+    	job.setVertexClass(TestLoadGraphVertex.class);
+    	job.setVertexInputFormatClass(BinaryLoadGraphInputFormat.class);
+        job.setVertexOutputFormatClass(BinaryLoadGraphOutputFormat.class);
+        job.setOutputKeyClass(BytesWritable.class);
+        job.setOutputValueClass(ByteWritable.class);
+        FileInputFormat.setInputPaths(job, HDFS_INPUTPATH);
+        FileOutputFormat.setOutputPath(job, new Path(HDFS_OUTPUTPAH));
+        job.getConfiguration().writeXml(new FileOutputStream(new File(outputPath)));
+    }
+    
+    private static void genMergeGraph() throws IOException {
+    	generateMergeGraphJob("MergeGraph", outputBase + "MergeGraph.xml");
+    }
+    
     private static void generateLogAlgorithmForMergeGraphJob(String jobName, String outputPath) throws IOException {
     	PregelixJob job = new PregelixJob(jobName);
     	job.setVertexClass(LogAlgorithmForMergeGraphVertex.class);
@@ -85,7 +101,8 @@
 	public static void main(String[] args) throws IOException {
 		// TODO Auto-generated method stub
 		genBinaryLoadGraph();
-		//genLogAlgorithmForMergeGraph();
+		genMergeGraph();
+		genLogAlgorithmForMergeGraph();
 		//genSequenceLoadGraph();
 		//genBasicBinaryLoadGraph();
 	}
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/pregelix/JobRun/RunJobTestSuite.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/pregelix/JobRun/RunJobTestSuite.java
index 879cc20..ad58168 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/pregelix/JobRun/RunJobTestSuite.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/pregelix/JobRun/RunJobTestSuite.java
@@ -41,7 +41,7 @@
 	private static final String PATH_TO_ONLY = "src/test/resources/only.txt";
 	private static final String FILE_EXTENSION_OF_RESULTS = "result";
 
-	private static final String DATA_PATH = "data/webmap/part-1-out-200000";//sequenceFileMergeTest
+	private static final String DATA_PATH = "data/webmap/part-1-out-500000";//sequenceFileMergeTest
 	private static final String HDFS_PATH = "/webmap/";
 	
 	private static final String HYRACKS_APP_NAME = "pregelix";
@@ -169,7 +169,7 @@
 		long totalTime = endTime - startTime;
 		System.out.println(totalTime);
 		try {
-			writer.write("Time: " + totalTime);
+			writer.write("Time: " + totalTime + "\r\n");
 			writer.close();
 		} catch (IOException e) { // TODO Auto-generated catch block 
 			e.printStackTrace();}