Open robertoschwald opened 9 years ago
We use the following exclusions does this work for you?
"changelog*", "2012-*", "load_*", "remove_*", "2013-*", "2014-*", "2015-*" // migrations
No, it doesn't work. Even used your exclusion list in BuildConfig.groovy, but error is the same. db-migration files and changelog.groovy are in the default grails-app/migrations dir.
Now I switched on Grails forked mode for test env (was set to false in grails.project.fork as you've written it is not supported in the coverage plugin for now), and it seems the exclusion works then, but after the unit test, I get:
Using grailsw
Base Directory: /testapp
|Loading Grails 2.4.4
|Configuring classpath
|Downloading: org/grails/plugins/audit-logging/1.0.4.EXP-SNAPSHOT/maven-metadata.xml
.
|Environment set to test
[mkdir] Created dir: /testapp/target/work/plugin-classes
..
|Compiling 10 source files
[groovyc] Compiling 10 source files to /testapp/target/work/plugin-build-classes
..
|Compiling 217 source files
[groovyc] Compiling 217 source files to /testapp/target/work/plugin-classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
. [mkdir] Created dir: /testapp/target/test-classes
.
|Compiling 4 source files
[groovyc] Compiling 4 source files to /testapp/target/test-classes
.....
|Compiling 1 source files
[groovyc] Compiling 1 source file to /testapp/target/work/plugin-classes
... [mkdir] Created dir: /testapp/target/classes
.
|Compiling 318 source files
[groovyc] Compiling 318 source files to /testapp/target/classes
...........................
|Running without daemon...
objc[10429]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
| Compiling 1 source files
| Compiling 1 source files.
| Compiling 1 source files..
| Compiling 1 source files...
| Compiling 1 source files....
| Compiling 25 source files
| Compiling 25 source files.
| Compiling 25 source files..
| Compiling 25 source files..
| Compiling 25 source files..
| Compiling 25 source files...
| Compiling 25 source files....
| Compiling 25 source files.....
| Instrumenting classes for coverage
| Instrumenting classes for coverage.
| Instrumenting classes for coverage..
| Instrumenting classes for coverage...
INFO: Found ASM 3: /Users/builduser/.grails/wrapper/2.4.4/grails-2.4.4/lib/asm/asm/jars/asm-3.3.1.jar.
Possibly because grails-core (grails-plugin-databinding) uses it.
Removing from instrumentation classpath!
| Instrumenting classes for coverage....
| Instrumenting classes for coverage.....
| Compiling 49 source files
| Compiling 49 source files.
| Running 60 unit tests...
| Running 60 unit tests... 1 of 60
...
| Tests PASSED - view reports in /testapp/target/test-reports
Feb 10, 2015 5:05:22 PM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler loadCoverageData
SEVERE: Cobertura: Error reading from object stream.
java.lang.ClassNotFoundException: net.sourceforge.cobertura.coveragedata.PackageData
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
This is how the test is performed:
grails test-app unit: -echoOut -coverage -nopost --non-interactive --plain-output --stacktrace --verbose
when disabling forked mode, "Invalid class name" error for all migration files reoccurs.
Environment: code-coverage 2.0.3-3 Grails 2.4.4 Fork mode disabled in test
I use database-migration files of name
This leads to coverage errors on all of those files (see below). I'm unable to exclude those files in the config to get rid of the error. Tried with