package water.parser;

import static org.junit.Assert.assertEquals;

import java.io.File;

import org.junit.BeforeClass;
import org.junit.Test;

import water.*;
import water.util.FileIntegrityChecker;

public class ParseProgressTest extends TestUtil {

  @BeforeClass public static void stall() { stall_till_cloudsize(1); }

  // Attempt a multi-jvm parse of covtype.
  // Silently exits if it cannot find covtype.
  @Test public void testCovtype() {
    File f = find_test_file("../datasets/UCI/UCI-large/covtype/covtype.data");
    if( f == null || !f.exists() )
      f = find_test_file("../demo/UCI-large/covtype/covtype.data");
    if( !f.exists() )
      return;
    FileIntegrityChecker c = FileIntegrityChecker.check(f,false);
    assertEquals(1,c.size());   // Exactly 1 file
    Key k = c.importFile(0, null);
    assertEquals(true,k!=null);

    for( int i=0; i<1; i++ ) {
      Key covkey = Key.make("c"+i+".hex");
      ParseDataset.parse(covkey,new Key[]{k});
      ValueArray ary = DKV.get(covkey).get();
      UKV.remove(covkey);
    }

    UKV.remove(k);
  }
}

@@ -626,24 +626,25 @@
 data%22);%0A
+%0A
     if( 
 !f.exist
@@ -635,29 +635,143 @@
     if( 
-!f.exists() )
+f == null %7C%7C !f.exists() ) %7B%0A      System.out.println(%22Could not find covtype.data, skipping ParseProgressTest.testCovtype()%22);
 %0A      r
@@ -777,16 +777,23 @@
 return;%0A
+    %7D%0A%0A
     File

Make ParseProgressTest pass again when covtype dataset not found.