diff --git a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostSuite.scala b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostSuite.scala index 96abe9946e12..6f4e98aa3d21 100644 --- a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostSuite.scala +++ b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostSuite.scala @@ -35,7 +35,7 @@ import ml.dmlc.xgboost4j.scala.{Booster, DMatrix, EvalTrait} class XGBoostSuite extends FunSuite with BeforeAndAfter { private implicit var sc: SparkContext = null - private val numWorkers = 4 + private val numWorkers = Runtime.getRuntime().availableProcessors() private class EvalError extends EvalTrait {