YARN-5834. TestNodeStatusUpdater.testNMRMConnectionConf compares nodemanager wait time to the incorrect value. (Chang Li via kasha)
(cherry picked from commit 3a98419532
)
This commit is contained in:
parent
d064d5dbb2
commit
f4c8dc4783
|
@ -1523,13 +1523,13 @@ public class TestNodeStatusUpdater {
|
||||||
long t = System.currentTimeMillis();
|
long t = System.currentTimeMillis();
|
||||||
long duration = t - waitStartTime;
|
long duration = t - waitStartTime;
|
||||||
boolean waitTimeValid = (duration >= nmRmConnectionWaitMs) &&
|
boolean waitTimeValid = (duration >= nmRmConnectionWaitMs) &&
|
||||||
(duration < (connectionWaitMs + delta));
|
(duration < (nmRmConnectionWaitMs + delta));
|
||||||
|
|
||||||
if(!waitTimeValid) {
|
if(!waitTimeValid) {
|
||||||
// throw exception if NM doesn't retry long enough
|
// throw exception if NM doesn't retry long enough
|
||||||
throw new Exception("NM should have tried re-connecting to RM during " +
|
throw new Exception("NM should have tried re-connecting to RM during " +
|
||||||
"period of at least " + connectionWaitMs + " ms, but " +
|
"period of at least " + nmRmConnectionWaitMs + " ms, but " +
|
||||||
"stopped retrying within " + (connectionWaitMs + delta) +
|
"stopped retrying within " + (nmRmConnectionWaitMs + delta) +
|
||||||
" ms: " + e, e);
|
" ms: " + e, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue