YARN-6079. Fix simple spelling errors in yarn test code. Contributed by vijay.

(cherry picked from commit 4db119b7b5)
This commit is contained in:
Junping Du 2017-01-10 18:20:27 -08:00
parent ce5ad0e88f
commit ba6a013341
9 changed files with 10 additions and 10 deletions

View File

@ -222,7 +222,7 @@ private <R> Map<String, GetSetPair> getGetSetPairs(Class<R> recordClass)
GetSetPair gsp = cur.getValue(); GetSetPair gsp = cur.getValue();
if ((gsp.getMethod == null) || if ((gsp.getMethod == null) ||
(gsp.setMethod == null)) { (gsp.setMethod == null)) {
LOG.info(String.format("Exclude protential property: %s\n", gsp.propertyName)); LOG.info(String.format("Exclude potential property: %s\n", gsp.propertyName));
itr.remove(); itr.remove();
} else { } else {
LOG.info(String.format("New property: %s type: %s", gsp.toString(), gsp.type)); LOG.info(String.format("New property: %s type: %s", gsp.toString(), gsp.type));

View File

@ -155,7 +155,7 @@ public void testAddInvalidlabel() throws IOException {
} catch (IOException e) { } catch (IOException e) {
caught = true; caught = true;
} }
Assert.assertTrue("invalid label charactor should not add to repo", caught); Assert.assertTrue("invalid label character should not add to repo", caught);
caught = false; caught = false;
try { try {

View File

@ -163,7 +163,7 @@ public void testNodeHealthService() throws Exception {
LOG.info("Checking Healthy--->timeout"); LOG.info("Checking Healthy--->timeout");
Assert.assertFalse("Node health status reported healthy even after timeout", Assert.assertFalse("Node health status reported healthy even after timeout",
healthStatus.getIsNodeHealthy()); healthStatus.getIsNodeHealthy());
Assert.assertTrue("Node script time out message not propogated", Assert.assertTrue("Node script time out message not propagated",
healthStatus.getHealthReport().equals( healthStatus.getHealthReport().equals(
NodeHealthScriptRunner.NODE_HEALTH_SCRIPT_TIMED_OUT_MSG NodeHealthScriptRunner.NODE_HEALTH_SCRIPT_TIMED_OUT_MSG
+ NodeHealthCheckerService.SEPARATOR + NodeHealthCheckerService.SEPARATOR

View File

@ -2102,7 +2102,7 @@ rls.new LocalizerRunner(new LocalizerContext(user, container1
Assert.assertEquals(userCachePath, destinationDirectory.getParent() Assert.assertEquals(userCachePath, destinationDirectory.getParent()
.toUri().toString()); .toUri().toString());
} else { } else {
throw new Exception("Unexpected resource recevied."); throw new Exception("Unexpected resource received.");
} }
} }
} }

View File

@ -622,7 +622,7 @@ protected Dispatcher createDispatcher() {
HAServiceProtocol.RequestSource.REQUEST_BY_USER); HAServiceProtocol.RequestSource.REQUEST_BY_USER);
FailFastDispatcher dispatcher = FailFastDispatcher dispatcher =
((FailFastDispatcher) rm.rmContext.getDispatcher()); ((FailFastDispatcher) rm.rmContext.getDispatcher());
// Verify transistion to transitionToStandby // Verify transition to transitionToStandby
rm.adminService.transitionToStandby(requestInfo); rm.adminService.transitionToStandby(requestInfo);
assertEquals("Fatal Event should be 0", 0, dispatcher.getEventCount()); assertEquals("Fatal Event should be 0", 0, dispatcher.getEventCount());
assertEquals("HA state should be in standBy State", HAServiceState.STANDBY, assertEquals("HA state should be in standBy State", HAServiceState.STANDBY,
@ -630,7 +630,7 @@ protected Dispatcher createDispatcher() {
try { try {
// Verify refreshAll call failure and check fail Event is dispatched // Verify refreshAll call failure and check fail Event is dispatched
rm.adminService.transitionToActive(requestInfo); rm.adminService.transitionToActive(requestInfo);
Assert.fail("Transistion to Active should have failed for refreshAll()"); Assert.fail("Transition to Active should have failed for refreshAll()");
} catch (Exception e) { } catch (Exception e) {
assertTrue("Service fail Exception expected", assertTrue("Service fail Exception expected",
e instanceof ServiceFailedException); e instanceof ServiceFailedException);

View File

@ -917,7 +917,7 @@ public void testResourceUpdateOnRebootedNode() {
Assert.assertEquals(NodeState.REBOOTED, node.getState()); Assert.assertEquals(NodeState.REBOOTED, node.getState());
Assert.assertEquals("Active Nodes", initialActive, cm.getNumActiveNMs()); Assert.assertEquals("Active Nodes", initialActive, cm.getNumActiveNMs());
Assert.assertEquals("Unhelathy Nodes", initialUnHealthy, Assert.assertEquals("Unhealthy Nodes", initialUnHealthy,
cm.getUnhealthyNMs()); cm.getUnhealthyNMs());
Assert.assertEquals("Decommissioning Nodes", initialDecommissioning, Assert.assertEquals("Decommissioning Nodes", initialDecommissioning,
cm.getNumDecommissioningNMs()); cm.getNumDecommissioningNMs());

View File

@ -828,7 +828,7 @@ public void testDRFUserLimits() throws Exception {
assertTrue("Verify user_1 got resources ", queueUser1.getUsed() assertTrue("Verify user_1 got resources ", queueUser1.getUsed()
.getMemorySize() > 0); .getMemorySize() > 0);
assertTrue( assertTrue(
"Exepected AbsoluteUsedCapacity > 0.95, got: " "Expected AbsoluteUsedCapacity > 0.95, got: "
+ b.getAbsoluteUsedCapacity(), b.getAbsoluteUsedCapacity() > 0.95); + b.getAbsoluteUsedCapacity(), b.getAbsoluteUsedCapacity() > 0.95);
// Verify consumedRatio is based on dominant resources // Verify consumedRatio is based on dominant resources

View File

@ -268,7 +268,7 @@ public static ClientRMService mockClientRMService(RMContext rmContext) {
when(clientRMService.getApplications(any(GetApplicationsRequest.class))) when(clientRMService.getApplications(any(GetApplicationsRequest.class)))
.thenReturn(response); .thenReturn(response);
} catch (YarnException e) { } catch (YarnException e) {
Assert.fail("Exception is not expteced."); Assert.fail("Exception is not expected.");
} }
return clientRMService; return clientRMService;
} }

View File

@ -161,7 +161,7 @@ public void testAppsFinished() throws JSONException, Exception {
assertEquals("incorrect number of elements", 1, apps.length()); assertEquals("incorrect number of elements", 1, apps.length());
try { try {
apps.getJSONArray("app").getJSONObject(0).getJSONObject("resourceInfo"); apps.getJSONArray("app").getJSONObject(0).getJSONObject("resourceInfo");
fail("resourceInfo object shouldnt be available for finished apps"); fail("resourceInfo object shouldn't be available for finished apps");
} catch (Exception e) { } catch (Exception e) {
assertTrue("resourceInfo shouldn't be available for finished apps", true); assertTrue("resourceInfo shouldn't be available for finished apps", true);
} }