diff options
author | uncleGen <hustyugm@gmail.com> | 2017-03-07 12:24:53 -0800 |
---|---|---|
committer | Kay Ousterhout <kayousterhout@gmail.com> | 2017-03-07 12:24:53 -0800 |
commit | 49570ed05d44f96549c49929f35c1c202556731a (patch) | |
tree | be3b835b5af93b7c1d685536186447e090451e03 | |
parent | d69aeeaff4f90ce92ee9e84f24905ea9efa7ece2 (diff) | |
download | spark-49570ed05d44f96549c49929f35c1c202556731a.tar.gz spark-49570ed05d44f96549c49929f35c1c202556731a.tar.bz2 spark-49570ed05d44f96549c49929f35c1c202556731a.zip |
[SPARK-19803][TEST] flaky BlockManagerReplicationSuite test failure
## What changes were proposed in this pull request?
200ms may be too short. Give more time for replication to happen and new block be reported to master
## How was this patch tested?
test manully
Author: uncleGen <hustyugm@gmail.com>
Author: dylon <hustyugm@gmail.com>
Closes #17144 from uncleGen/SPARK-19803.
-rw-r--r-- | core/src/test/scala/org/apache/spark/storage/BlockManagerReplicationSuite.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/test/scala/org/apache/spark/storage/BlockManagerReplicationSuite.scala b/core/src/test/scala/org/apache/spark/storage/BlockManagerReplicationSuite.scala index ccede34b8c..75dc04038d 100644 --- a/core/src/test/scala/org/apache/spark/storage/BlockManagerReplicationSuite.scala +++ b/core/src/test/scala/org/apache/spark/storage/BlockManagerReplicationSuite.scala @@ -489,12 +489,12 @@ class BlockManagerProactiveReplicationSuite extends BlockManagerReplicationBehav Thread.sleep(200) } - // giving enough time for replication complete and locks released - Thread.sleep(500) - - val newLocations = master.getLocations(blockId).toSet + val newLocations = eventually(timeout(5 seconds), interval(10 millis)) { + val _newLocations = master.getLocations(blockId).toSet + assert(_newLocations.size === replicationFactor) + _newLocations + } logInfo(s"New locations : $newLocations") - assert(newLocations.size === replicationFactor) // there should only be one common block manager between initial and new locations assert(newLocations.intersect(blockLocations.toSet).size === 1) |