Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-15496

Build is successful when Maven fails and tests are quarantined

      Problem

      Build is successful when Maven fails and tests are quarantined. It looks like using the 'Use Maven return code' feature is not working when used with quarantined tests. In the example below, Maven returned an error code but it looks like Bamboo ignored it, maybe mistaking it for a failed test.

      Steps to reproduce

      Make sure that Maven tasks have 'Use Maven return code' checked. Run a build with quarantined tests.

      // this is correct
      simple	23-Jan-2015 14:03:31	Failing task since return code of [/opt/maven-3.2/bin/mvn -Djava.io.tmpdir=/tmp/AMDN-AMDNRELEASE-JOB1 release:perform --batch-mode -DignoreSnapshots=true -Dresume=false] was 1 while expected 0
      simple	23-Jan-2015 14:03:31	Parsing test results under /mnt/bamboo-ebs/bamboo-agent/build-dir/AMDN-AMDNRELEASE-JOB1...
      simple	23-Jan-2015 14:03:31	Injected variable bamboo.mvn.release.releaseVersion=0.6.38 in RESULT scope
      // this is not correct: all tests pass but maven had an error and did not produce any artifact
      simple	23-Jan-2015 14:03:31	Changing Task Result to SUCCESS as all failed tests were quarantined.
      

      Bamboo detects the task is failing (1st line of the exemple above), but doesn't mark the whole build as failed.

            [BAM-15496] Build is successful when Maven fails and tests are quarantined

            Atlassian Update - 23 June 2020

            Hi,

            Thank you for raising this issue. We regret to inform you that due to limited demand, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request.

            This is an automated update triggered by low user engagement with this suggestion (number of votes, number of watchers).

            Although we're aware the issue is still important to those of you who were involved in the conversations around it, we want to be clear in managing your expectations. The Bamboo team is focusing on issues that have broad impact and high value, reflected by the number of comments, votes, support cases, and customers interested. Please consult the Atlassian Bugfix Policy for more details.

            We understand how disappointing this decision may be but we want to be fully transparent when communicating with our users.

            Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments.

            Thank you,

            Bamboo Team

            Martyna Wojtas (Inactive) added a comment - Atlassian Update - 23 June 2020 Hi, Thank you for raising this issue. We regret to inform you that due to limited demand, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request. This is an automated update triggered by low user engagement with this suggestion (number of votes, number of watchers). Although we're aware the issue is still important to those of you who were involved in the conversations around it, we want to be clear in managing your expectations. The Bamboo team is focusing on issues that have broad impact and high value, reflected by the number of comments, votes, support cases, and customers interested. Please consult the Atlassian Bugfix Policy for more details. We understand how disappointing this decision may be but we want to be fully transparent when communicating with our users. Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments. Thank you, Bamboo Team

            I'm also seeing this behaviour for Ant tasks, on 5.10.3

            Daniel Hodder added a comment - I'm also seeing this behaviour for Ant tasks, on 5.10.3

            This issue manifests also in this wrong behavior:

            • pass -Dmaven.test.failure.ignore=true to Maven to make it return 'success' even when tests fail
            • Build will be green regardless of the test results

            This can be worked around either by adding the JUnit Parser job, or by disabling "Use Maven return code".

            Eduard Wirch added a comment - This issue manifests also in this wrong behavior: pass -Dmaven.test.failure.ignore=true to Maven to make it return 'success' even when tests fail Build will be green regardless of the test results This can be worked around either by adding the JUnit Parser job, or by disabling "Use Maven return code".

              Unassigned Unassigned
              brosa Bruno Rosa
              Affected customers:
              1 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: