Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging merging test result files message as debug instead of warning #7753

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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