Skip to content

Commit

Permalink
Merge pull request apache#138 from concretevitamin/fix-collect-test
Browse files Browse the repository at this point in the history
[SPARKR-183] Simplify a unit test to cut down running time.
  • Loading branch information
shivaram committed Jan 29, 2015
2 parents 9c0637a + 12c102a commit a9f8e8e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pkg/inst/tests/test_parallelize_collect.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ test_that("collect(), following a parallelize(), gives back the original collect
})

test_that("regression: collect() following a parallelize() does not drop elements", {
lapply(1:72,
function(collLen) {
lapply(1:15, function(numPart) {
expected <- runif(collLen)
actual <- collect(parallelize(jsc, expected, numPart))
expect_equal(actual, as.list(expected))
})
})
# 10 %/% 6 = 1, ceiling(10 / 6) = 2
collLen <- 10
numPart <- 6
expected <- runif(collLen)
actual <- collect(parallelize(jsc, expected, numPart))
expect_equal(actual, as.list(expected))
})

test_that("parallelize() and collect() work for lists of pairs (pairwise data)", {
Expand Down

0 comments on commit a9f8e8e

Please sign in to comment.