Skip to content

Commit 6fd5fb1

Browse files
committed
Run sampleLogNormal bounds check 1000 times
This adds about 150 ms to the test duration.
1 parent 1638598 commit 6fd5fb1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

graphx/src/test/scala/org/apache/spark/graphx/util/GraphGeneratorsSuite.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,11 @@ class GraphGeneratorsSuite extends FunSuite with LocalSparkContext {
6464
val sigma = 1.3
6565
val maxVal = 100
6666

67-
val dstId = GraphGenerators.sampleLogNormal(mu, sigma, maxVal)
68-
assert(dstId < maxVal)
67+
val trials = 1000
68+
for (i <- 1 to trials) {
69+
val dstId = GraphGenerators.sampleLogNormal(mu, sigma, maxVal)
70+
assert(dstId < maxVal)
71+
}
6972

7073
val dstId_round1 = GraphGenerators.sampleLogNormal(mu, sigma, maxVal, 12345)
7174
val dstId_round2 = GraphGenerators.sampleLogNormal(mu, sigma, maxVal, 12345)

0 commit comments

Comments
 (0)