wynot12 commented on a change in pull request #73: [NEMO-62] Support Multiple Jobs Submission in a Single User Program URL: https://github.com/apache/incubator-nemo/pull/73#discussion_r203611605
########## File path: examples/spark/src/test/java/edu/snu/nemo/examples/spark/MRJava.java ########## @@ -66,8 +66,30 @@ public void testSparkWordCount() throws Exception { ExampleTestUtil.deleteOutputFile(fileBasePath, outputFileName); } } + /* TODO #152: enable execution of multiple jobs (call scheduleJob multiple times with caching). + @Test(timeout = TIMEOUT) + public void testSparkWordAndLineCount() throws Exception { + final String inputFileName = "sample_input_wordcount_spark"; + final String outputFileName = "sample_output_word_and_line_count"; + final String testResourceFilename = "test_output_word_and_line_count"; + final String inputFilePath = fileBasePath + inputFileName; + final String outputFilePath = fileBasePath + outputFileName; + + JobLauncher.main(builder + .addJobId(JavaWordAndLineCount.class.getSimpleName() + "_test") + .addUserMain(JavaWordAndLineCount.class.getCanonicalName()) + .addUserArgs(inputFilePath, outputFilePath) + .addOptimizationPolicy(DefaultPolicy.class.getCanonicalName()) + .build()); + + try { + ExampleTestUtil.ensureOutputValidity(fileBasePath, outputFileName, testResourceFilename); + } finally { + ExampleTestUtil.deleteOutputFile(fileBasePath, outputFileName); + } + } - /* Temporary disabled because of Travis issue + /* Temporary disabled due to Travis issue Review comment: I'm okay with the current code as I already told you offline :) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services