Skip to content

Commit

Permalink
[SPARK-36048][TEST][CORE] Fix HealthTrackerSuite.allExecutorAndHostIds
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Fix the executor ids that are declared at `allExecutorAndHostIds`.

### Why are the changes needed?

Currently, `HealthTrackerSuite.allExecutorAndHostIds` is mistakenly declared, which leads to the executor exclusion isn't correctly tested.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass existing tests in `HealthTrackerSuite`.

Closes apache#33262 from Ngone51/fix-healthtrackersuite.

Authored-by: yi.wu <yi.wu@databricks.com>
Signed-off-by: yi.wu <yi.wu@databricks.com>
  • Loading branch information
Ngone51 committed Jul 13, 2021
1 parent 201566c commit f8a80c4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ class HealthTrackerSuite extends SparkFunSuite with BeforeAndAfterEach with Mock
// All executors and hosts used in tests should be in this set, so that [[assertEquivalentToSet]]
// works. Its OK if its got extraneous entries
val allExecutorAndHostIds = {
(('A' to 'Z')++ (1 to 100).map(_.toString))
.flatMap{ suffix =>
('A' to 'Z')
.flatMap { suffix =>
Seq(s"host$suffix", s"host-$suffix")
}
}.toSet
}.toSet ++ (1 to 100).map(_.toString)

/**
* Its easier to write our tests as if we could directly look at the sets of nodes & executors in
Expand Down

0 comments on commit f8a80c4

Please sign in to comment.