Teamcity still commits after a Remote Run build failure

We use Maven2, IntelliJ and TeamCity

When we commit our code we use the Remote Run feature from the TeamCity plugin in the IntelliJ IDEA. TeamCity is configured to do a clean checkout of the code, build it, run the unit tests and then ONLY commit when all tests succeed.

The other day we had a compilation error in one of the testcases: a dependency was left out of the pom.xml by mistake. The build failed and stopped at that point:

...
BUILD FAILURE
: -


: Compiler (<1s)
: Compilation failure
:
: C:\BuildAgent\work\Server\Vlafo_HEAD_continuous_build\olympus\verbintenissen\src\test\java\be\vlafo\verbintenissen\test\IMBBetalenConstraintsUnitTestCase.java:[19,31] package be.vlafo.financien.test does not exist
:
: C:\BuildAgent\work\Server\Vlafo_HEAD_continuous_build\olympus\verbintenissen\src\test\java\be\vlafo\verbintenissen\test\IMBBetalenConstraintsUnitTestCase.java:[50,32] cannot find symbol
: symbol : class MockBetaling
: location: class be.vlafo.verbintenissen.test.IMBBetalenConstraintsUnitTestCase
:
:
: -


: For more information, run Maven with the -e switch
: -


: Total time: 1 minute 44 seconds
: Finished at: Thu Jan 17 15:21:17 CET 2008
: Final Memory: 28M/63M
: -


: Number of processed tests: 0
: Build finished

But: TeamCity STILL committed the code.

How is this possible?
It's like the system considers the tests gave no errors when no test got to run because of a failed build.

Message was edited by:
Bastiaan Proot

1 comment

Hello Sergey,

I guess you're using Maven 2.0.7. If it's true this is a known problem -
see http://jira.codehaus.org/browse/MNG-3084.

I recommend you upgrading to 2.0.8.

We use Maven2, IntelliJ and TeamCity

When we commit our code we use the Remote Run feature from the
TeamCity plugin in the IntelliJ IDEA. TeamCity is configured to do a
clean checkout of the code, build it, run the unit tests and then ONLY
commit when all tests succeed.

The other day we had a compilation error in one of the testcases: a
dependency was left out of the pom.xml by mistake. The build failed
and stopped at that point:

..

BUILD FAILURE

:
----------------------------------------------------------------------
--

: Compiler (<1s)

: Compilation failure

:

:
C:\BuildAgent\work\Server\Vlafo_HEAD_continuous_build\olympus\verbinte
nissen\src\test\java\be\vlafo\verbintenissen\test\IMBBetalenConstraint
sUnitTestCase.java:[19,31] package be.vlafo.financien.test does not
exist

:

:
C:\BuildAgent\work\Server\Vlafo_HEAD_continuous_build\olympus\verbinte
nissen\src\test\java\be\vlafo\verbintenissen\test\IMBBetalenConstraint
sUnitTestCase.java:[50,32] cannot find symbol

: symbol : class MockBetaling

: location: class
be.vlafo.verbintenissen.test.IMBBetalenConstraintsUnitTestCase

:

:

:
----------------------------------------------------------------------
--

: For more information, run Maven with the -e switch

:
----------------------------------------------------------------------
--

: Total time: 1 minute 44 seconds

: Finished at: Thu Jan 17 15:21:17 CET 2008

: Final Memory: 28M/63M

:
----------------------------------------------------------------------
--

: Number of processed tests: 0

: Build finished

But: TeamCity STILL committed the code.

How is this possible?
It's like the system considers the tests gave no errors when no test
have been run because of a failed build.

--
Sergey Anchipolevsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.