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

Maven@3 does not fail task on test failures #14570

Closed
mercer opened this issue Mar 11, 2021 · 3 comments
Closed

Maven@3 does not fail task on test failures #14570

mercer opened this issue Mar 11, 2021 · 3 comments
Assignees
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug Task: Maven

Comments

@mercer
Copy link

mercer commented Mar 11, 2021

Question, Bug, or Feature?
Type: Bug

Enter Task Name: Maven@3

Environment

Azure Pipelines:
- account name: censored

  • Agent - Hosted or Private:
    • private: ubuntu 18.04

Issue Description

  1. junit test fails
  2. but task does not fail
- task: Maven@3
  inputs:
    mavenPomFile: '$(system.defaultWorkingDirectory)/E2e/pom.xml'
    javaHomeOption: 'JDKVersion'
    jdkArchitectureOption: 'x64'
    goals: 'clean verify'
    options: '-Dtest=".*ApiTest" -Dsurefire.rerunFailingTestsCount=3'
    publishJUnitResults: true
    testResultsFiles: '$(system.defaultWorkingDirectory)/E2e/target/surefire-reports/TEST-*.xml'
  displayName: 'Execute All API Integration Tests'
  timeoutInMinutes: 10

Build is green after this.

image

Task logs

N/A did not collect

@github-actions github-actions bot added Area: ABTT Akvelon Build Tasks Team area of work bug Task: Maven triage labels Mar 11, 2021
@sdobrodeev sdobrodeev removed the triage label Mar 12, 2021
@vladislav-ryzhov vladislav-ryzhov self-assigned this Mar 19, 2021
@vladislav-ryzhov
Copy link
Contributor

Hi @mercer !
Could you please enable system diagnostic by adding System.Debug: trueto variables in your YAML file (screenshot #1) and send the pipeline logs? (screenshot #2)
Could you tell us which version of the azure devops server you are using? On prem or cloud?
If there is some sensitive information and you don't want to share it publicly, you can send it to me by email [email protected].
Please feel free to ask any questions about the process of getting logs about the pipeline.

image
image

@mercer
Copy link
Author

mercer commented Mar 31, 2021

I'm afraid I don't have that setup at hand anymore.

Please try to reproduce with the data I provided.

  1. create a fresh java project + pipeline with a task configured as in the ticket (or similarly)
  2. have a test that passes and a test that fails
  3. execute the pipeline, test results are published
  4. however, the pipeline is green

Expected behavior is that the pipeline fails when the test is red. Notice that PublishTestResults@2 manages to fail the pipeline just fine.

@vladislav-ryzhov
Copy link
Contributor

Hello @mercer
We have a similar ticket #14514, and it looks like you have the same problems.
We've already fixed this issue, and I think this will fix your issue as well.
The changes will be rolled out in a few weeks.
Let me close this ticket. Please feel free to ask any further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug Task: Maven
Projects
None yet
Development

No branches or pull requests

3 participants