Skip to content

Commit 9dbdadf

Browse files
committed
YARN-11610. Fix CheckStyle.
1 parent 7f10954 commit 9dbdadf

File tree

1 file changed

+5
-4
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/policies/manager

1 file changed

+5
-4
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/policies/manager/TestWeightedHomePolicyManager.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ public class TestWeightedHomePolicyManager extends BasePolicyManagerTest {
3434
@Before
3535
public void setup() {
3636
// configure a policy
37-
wfp = new WeightedHomePolicyManager();
38-
wfp.setQueue("queue1");
37+
WeightedHomePolicyManager whpm = new WeightedHomePolicyManager();
38+
whpm.setQueue("queue1");
39+
3940
SubClusterId sc1 = SubClusterId.newInstance("sc1");
4041
policyInfo = new WeightedPolicyInfo();
41-
4242
Map<SubClusterIdInfo, Float> routerWeights = new HashMap<>();
4343
routerWeights.put(new SubClusterIdInfo(sc1), 0.2f);
4444
policyInfo.setRouterPolicyWeights(routerWeights);
4545

46-
((WeightedHomePolicyManager) wfp).setWeightedPolicyInfo(policyInfo);
46+
whpm.setWeightedPolicyInfo(policyInfo);
47+
this.wfp = whpm;
4748

4849
//set expected params that the base test class will use for tests
4950
expectedPolicyManager = WeightedHomePolicyManager.class;

0 commit comments

Comments
 (0)