Repository: spark Updated Branches: refs/heads/master f2e22aebf -> 36b48ee6e
[SPARK-21801][SPARKR][TEST] set random seed for predictable test ## What changes were proposed in this pull request? set.seed() before running tests ## How was this patch tested? jenkins, appveyor Author: Felix Cheung <[email protected]> Closes #19111 from felixcheung/rranseed. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/36b48ee6 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/36b48ee6 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/36b48ee6 Branch: refs/heads/master Commit: 36b48ee6e92661645648a001d0d83623a8e5d601 Parents: f2e22ae Author: Felix Cheung <[email protected]> Authored: Wed Sep 6 09:53:55 2017 -0700 Committer: Felix Cheung <[email protected]> Committed: Wed Sep 6 09:53:55 2017 -0700 ---------------------------------------------------------------------- R/pkg/tests/run-all.R | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/36b48ee6/R/pkg/tests/run-all.R ---------------------------------------------------------------------- diff --git a/R/pkg/tests/run-all.R b/R/pkg/tests/run-all.R index 0aefd80..a1834a2 100644 --- a/R/pkg/tests/run-all.R +++ b/R/pkg/tests/run-all.R @@ -43,6 +43,8 @@ if (identical(Sys.getenv("NOT_CRAN"), "true")) { test_package("SparkR") if (identical(Sys.getenv("NOT_CRAN"), "true")) { + # set random seed for predictable results. mostly for base's sample() in tree and classification + set.seed(42) # for testthat 1.0.2 later, change reporter from "summary" to default_reporter() testthat:::run_tests("SparkR", file.path(sparkRDir, "pkg", "tests", "fulltests"), --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
