YARN-6297. TestAppLogAggregatorImp.verifyFilesUploaded() should check # of filed uploaded with that of files expected (haibochen via rkanter)
(cherry picked from commit 287ba4ffa6
)
This commit is contained in:
parent
ec4c2d42fe
commit
11d4cdc3a6
|
@ -146,7 +146,7 @@ public class TestAppLogAggregatorImpl {
|
||||||
|
|
||||||
verifyLogAggregationWithExpectedFiles2DeleteAndUpload(applicationId,
|
verifyLogAggregationWithExpectedFiles2DeleteAndUpload(applicationId,
|
||||||
containerId, logRententionSec, recoveredLogInitedTimeMillis,
|
containerId, logRententionSec, recoveredLogInitedTimeMillis,
|
||||||
logFiles, new HashSet<File>());
|
logFiles, logFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -170,7 +170,7 @@ public class TestAppLogAggregatorImpl {
|
||||||
|
|
||||||
final long week = 7 * 24 * 60 * 60;
|
final long week = 7 * 24 * 60 * 60;
|
||||||
final long recoveredLogInitedTimeMillis = System.currentTimeMillis() -
|
final long recoveredLogInitedTimeMillis = System.currentTimeMillis() -
|
||||||
2*week;
|
2 * week * 1000;
|
||||||
verifyLogAggregationWithExpectedFiles2DeleteAndUpload(
|
verifyLogAggregationWithExpectedFiles2DeleteAndUpload(
|
||||||
applicationId, containerId, week, recoveredLogInitedTimeMillis,
|
applicationId, containerId, week, recoveredLogInitedTimeMillis,
|
||||||
logFiles, new HashSet<File>());
|
logFiles, new HashSet<File>());
|
||||||
|
@ -257,7 +257,7 @@ public class TestAppLogAggregatorImpl {
|
||||||
Set<String> filesExpected) {
|
Set<String> filesExpected) {
|
||||||
final String errMsgPrefix = "The set of files uploaded are not the same " +
|
final String errMsgPrefix = "The set of files uploaded are not the same " +
|
||||||
"as expected";
|
"as expected";
|
||||||
if(filesUploaded.size() != filesUploaded.size()) {
|
if(filesUploaded.size() != filesExpected.size()) {
|
||||||
fail(errMsgPrefix + ": actual size: " + filesUploaded.size() + " vs " +
|
fail(errMsgPrefix + ": actual size: " + filesUploaded.size() + " vs " +
|
||||||
"expected size: " + filesExpected.size());
|
"expected size: " + filesExpected.size());
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ public class TestAppLogAggregatorImpl {
|
||||||
FileContext lfs, long recoveredLogInitedTime) throws IOException {
|
FileContext lfs, long recoveredLogInitedTime) throws IOException {
|
||||||
super(dispatcher, deletionService, conf, appId, ugi, nodeId,
|
super(dispatcher, deletionService, conf, appId, ugi, nodeId,
|
||||||
dirsHandler, remoteNodeLogFileForApp, appAcls,
|
dirsHandler, remoteNodeLogFileForApp, appAcls,
|
||||||
logAggregationContext, context, lfs, recoveredLogInitedTime);
|
logAggregationContext, context, lfs, -1, recoveredLogInitedTime);
|
||||||
this.applicationId = appId;
|
this.applicationId = appId;
|
||||||
this.deletionService = deletionService;
|
this.deletionService = deletionService;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue