package hex.singlenoderf;

import hex.trees.TreeTestWithBalanceAndCrossVal;
import junit.framework.Assert;
import water.*;
import water.fvec.Frame;
import water.fvec.Vec;

public class SpeeDRFTest2 extends TreeTestWithBalanceAndCrossVal {
/*
  @Override public void testCarBalanceAndCrossValidation() {
  }
  @Override public void testCovtypeBalanceAndCrossValidation() {
  }
  @Override public void testWeatherDataset() {
  } */

  @Override protected void testBalanceWithCrossValidation(String dataset, int response, int[] ignored_cols, int ntrees, int nfolds) {
    Frame f = parseFrame(dataset);
    SpeeDRFModel model = null;
    SpeeDRF spdrf = new SpeeDRF();
    try {
      Vec respVec = f.vec(response);
      // Build a model
      spdrf.source = f;
      spdrf.response = respVec;
      spdrf.ignored_cols = ignored_cols;
      spdrf.classification = true;
      spdrf.num_trees = ntrees;
      spdrf.balance_classes = true;
      spdrf.n_folds = nfolds;
      spdrf.keep_cross_validation_splits = false;
      spdrf.invoke();
      Assert.assertEquals("Number of cross validation model is wrond!", nfolds, spdrf.xval_models.length);
      model = UKV.get(spdrf.dest());
    } finally {
      if (f!=null) f.delete();
      if (model!=null) {
        if (spdrf.xval_models!=null) {
          for (Key k : spdrf.xval_models) {
            Model m = UKV.get(k);
            m.delete();
          }
        }
        model.delete();
      }
    }
  }
}

package hex.singlenoderf;

import hex.trees.TreeTestWithBalanceAndCrossVal;
import junit.framework.Assert;
import water.*;
import water.fvec.Frame;
import water.fvec.Vec;

public class SpeeDRFTest2 extends TreeTestWithBalanceAndCrossVal {

  // FIXME: all the tests are ignored here!
  // Please fix SpeeDRF to handle categoricals as the rest
  // of algorithms
  @Override public void testCarBalanceAndCrossValidation() {
  }
  @Override public void testCovtypeBalanceAndCrossValidation() {
  }
  @Override public void testWeatherDataset() {
  }

  @Override protected void testBalanceWithCrossValidation(String dataset, int response, int[] ignored_cols, int ntrees, int nfolds) {
    Frame f = parseFrame(dataset);
    SpeeDRFModel model = null;
    SpeeDRF spdrf = new SpeeDRF();
    try {
      Vec respVec = f.vec(response);
      // Build a model
      spdrf.source = f;
      spdrf.response = respVec;
      spdrf.ignored_cols = ignored_cols;
      spdrf.classification = true;
      spdrf.num_trees = ntrees;
      spdrf.balance_classes = true;
      spdrf.n_folds = nfolds;
      spdrf.keep_cross_validation_splits = false;
      spdrf.invoke();
      Assert.assertEquals("Number of cross validation model is wrond!", nfolds, spdrf.xval_models.length);
      model = UKV.get(spdrf.dest());
    } finally {
      if (f!=null) f.delete();
      if (model!=null) {
        if (spdrf.xval_models!=null) {
          for (Key k : spdrf.xval_models) {
            Model m = UKV.get(k);
            m.delete();
          }
        }
        model.delete();
      }
    }
  }
}

Disable SpeeDRF tests since - SpeeDRF does not support handling different categoricals in train/test dataset - leaking keys