Project: clover
Issue CLOV-1015: Test Optimization says 0 tests should run but all tests are run anyway
Recently upgraded my Maven builds to use the Maven Surefire plugin version 2.9. Now my builds that run Clover2:optimized and say 0 tests should run, run all tests anyway. The upshot of this is that our optimized test runs are now taking over an hour versus the 15 to 20 minutes they were when the tests were correctly optimized away. Here is a section of the log file that shows the problem: {noformat} [shell] cd dba; mvn -PPERSONAL,UnitTests,Clover.optimize -Djava.awt.headless=true --offline -Dforkmode=once -Dmaven.download.meter=silent -DskipAssembly -Dmaven.test.failure.ignore=true -Dmaven.test.redirectTestOutputToFile=false -Dmaven.clover.licenseLocation=/prodinfolocal/BambooHome/clover.license -Dclover.plugin.version=3.1.0 -Dclover.version=3.1.0 install clover2:aggregate clover2:clover [INFO] NOTE: Maven is executing in offline mode. Any artifacts not already in your local repository will be inaccessible. [INFO] Scanning for projects... [WARNING]	Profile with id: 'PERSONAL' has not been activated. [WARNING]	Profile with id: 'UnitTests' has not been activated. [INFO] ------------------------------------------------------------------------ [INFO] Building dba [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [clover2:setup {execution: clover}] [INFO] No Clover instrumentation done on source files in: [/Users/mhusby/workarea/dba/src/main/java] as no matching sources files found [INFO] No Clover instrumentation done on source files in: [/Users/mhusby/workarea/dba/src/test/java] as no matching sources files found [WARNING] Using [Squid:configuration:jar:1.0-SNAPSHOT], built on Fri Jul 22 15:44:02 EDT 2011 even though a Clovered version exists but it's older (lastModified: Fri Jul 22 15:43:02 EDT 2011 ) and could fail the build. Please consider running Clover again on that dependency's project. [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 2 resources [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources {execution: default-testResources}] [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 6 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [clover2:optimize {execution: clover}] [INFO] Adding fileset: directory=/Users/mhusby/workarea/dba/target/clover/src-test-instrumented, includes=[**/*Tests.*, **/*Test.*, **/Test*.*, qxjShouldNeverMatchAClass], excludes=[**/*TestCase.*, **/Test*Servlet.*, **/Abstract*.*, **/*FormModuleTests.*, **/*.xml, **/*$*.*] [INFO] Clover estimates having saved around 44 seconds on this optimized test run. The full test run takes approx. 44 seconds [INFO] Clover included 0 test classes in this run (total # test classes : 22) [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: /Users/mhusby/workarea/dba/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running edu.mit.broad.prodinfo.dba.BlobDefTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.327 sec Running edu.mit.broad.prodinfo.dba.LongDefTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running edu.mit.broad.prodinfo.dba.ExceptionWrapperTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running edu.mit.broad.prodinfo.dba.DoubleDefTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running edu.mit.broad.prodinfo.dba.CacheMapTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.108 sec Running edu.mit.broad.prodinfo.dba.OurDBsTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.596 sec Running edu.mit.broad.prodinfo.dba.VArrayDefTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec Running edu.mit.broad.prodinfo.dba.VArrayFormatterTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec Running edu.mit.broad.prodinfo.dba.RowDefTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.311 sec Running edu.mit.broad.prodinfo.dba.BigDecimalDefTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec Running edu.mit.broad.prodinfo.dba.DoubleFormatterTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running edu.mit.broad.prodinfo.dba.DateFormatterTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec Running edu.mit.broad.prodinfo.dba.LongFormatterTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running edu.mit.broad.prodinfo.dba.ClobDefTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec Running edu.mit.broad.prodinfo.dba.DBTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.778 sec Running edu.mit.broad.prodinfo.dba.DataIteratorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec Running edu.mit.broad.prodinfo.dba.ProcedureDefTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.052 sec Running edu.mit.broad.prodinfo.dba.VArrayListTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec Running edu.mit.broad.prodinfo.dba.DBPoolTest Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 39.08 sec Running edu.mit.broad.prodinfo.dba.StringDefTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec Running edu.mit.broad.prodinfo.dba.DataDefIteratorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec Running edu.mit.broad.prodinfo.dba.RowTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.54 sec Results : Tests run: 49, Failures: 0, Errors: 0, Skipped: 1 [INFO] [clover2:snapshot {execution: clover}] [INFO] No span specified, using span of: 48s [INFO] Saving snapshot to: /Users/mhusby/.clover/Squid-dba/clover.snapshot [INFO] Clover Version 3.1.0, built on May 31 2011 (build-821) [INFO] Loaded from: /Users/mhusby/.m2/repository/com/cenqua/clover/clover/3.1.0/clover-3.1.0.jar [INFO] Clover: Academic License registered to Broad/MIT Institute. [INFO] Updating snapshot '/Users/mhusby/.clover/Squid-dba/clover.snapshot' against Clover database at '/Users/mhusby/workarea/dba/target/clover/clover.db' {noformat}
Story points: 5