seojangho commented on a change in pull request #5: [NEMO-27] Element Wise 
Block Write
URL: https://github.com/apache/incubator-nemo/pull/5#discussion_r187789194
 
 

 ##########
 File path: 
examples/beam/src/test/java/edu/snu/nemo/examples/beam/AlternatingLeastSquareITCase.java
 ##########
 @@ -52,8 +54,12 @@ public void setUp() throws Exception {
 
   @After
   public void tearDown() throws Exception {
-    ExampleTestUtil.ensureALSOutputValidity(fileBasePath, outputFileName, 
testResourceFileName);
+    final Optional<String> errorMsg =
+        ExampleTestUtil.ensureALSOutputValidity(fileBasePath, outputFileName, 
testResourceFileName);
     ExampleTestUtil.deleteOutputFile(fileBasePath, outputFileName);
+    if (errorMsg.isPresent()) {
+      throw new RuntimeException(errorMsg.get());
+    }
 
 Review comment:
   How about using `finally` to remove output files and let 
`ensureOutputValidity` untouched?

----------------------------------------------------------------
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

Reply via email to