Skip to content

Commit

Permalink
Logging merging test result files message as debug instead of warning (
Browse files Browse the repository at this point in the history
…#6607)

* Logging merge test result file as debug instead of warning

- Removed the corresponding log.

* Updating the task version & adding loc files.
  • Loading branch information
navin22 authored and Nitin Gurram committed Mar 6, 2018
1 parent ce47b32 commit 55ed741
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"loc.input.help.configuration": "Configuration for which the tests were run.",
"loc.input.label.publishRunAttachments": "Upload test results files",
"loc.input.help.publishRunAttachments": "A test run is created for each results file. Check this option to merge results into a single test run. To optimize for better performance, results will be merged into a single run if there are more than 100 result files, irrespective of this option.",
"loc.messages.mergeFiles": "Number of results files is greater than %d. Therefore merging all files to publish results against a single test run.",
"loc.messages.NoMatchingFilesFound": "No test result files matching '%s' were found.",
"loc.messages.ErrorTestResultsPublisher": "Error while executing TestResultsPublisher: %s."
}
3 changes: 2 additions & 1 deletion Tasks/PublishTestResults/publishtestresults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ async function run() {
let matchingTestResultsFiles: string[] = tl.findMatch(searchFolder, testResultsFiles);
const testResultsFilesCount = matchingTestResultsFiles ? matchingTestResultsFiles.length : 0;

tl.debug(`Detected ${testResultsFilesCount} test result files`)
const forceMerge = testResultsFilesCount > MERGE_THRESHOLD;
if (forceMerge) {
tl.warning(tl.loc('mergeFiles', MERGE_THRESHOLD));
tl.debug('Detected large number of test result files. Merged all of them into a single file and published a single test run to optimize for test result publish performance instead of publishing hundreds of test runs');
}

if (testResultsFilesCount === 0) {
Expand Down
3 changes: 1 addition & 2 deletions Tasks/PublishTestResults/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 2,
"Minor": 0,
"Patch": 4
"Patch": 5
},
"demands": [],
"releaseNotes": "<ul><li>NUnit3 support</li><li>Support for Minimatch files pattern</li></ul>",
Expand Down Expand Up @@ -112,7 +112,6 @@
}
},
"messages": {
"mergeFiles": "Number of results files is greater than %d. Therefore merging all files to publish results against a single test run.",
"NoMatchingFilesFound": "No test result files matching '%s' were found.",
"ErrorTestResultsPublisher": "Error while executing TestResultsPublisher: %s."
}
Expand Down
3 changes: 1 addition & 2 deletions Tasks/PublishTestResults/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 2,
"Minor": 0,
"Patch": 4
"Patch": 5
},
"demands": [],
"releaseNotes": "ms-resource:loc.releaseNotes",
Expand Down Expand Up @@ -112,7 +112,6 @@
}
},
"messages": {
"mergeFiles": "ms-resource:loc.messages.mergeFiles",
"NoMatchingFilesFound": "ms-resource:loc.messages.NoMatchingFilesFound",
"ErrorTestResultsPublisher": "ms-resource:loc.messages.ErrorTestResultsPublisher"
}
Expand Down

0 comments on commit 55ed741

Please sign in to comment.