-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
code coverage hookup #5077
code coverage hookup #5077
Conversation
Do you know if it would somehow possible not to duplicate the randomized-testing configurations between the default profile and the test-coverage profile? Otherwise I'm afraid they would quickly diverge. |
There is. The main issue is this line inside randomizer - ${tests.jvm.argline} -That overwrites the coverage use of argLine [INFO] argLine set to -javaagent:/home/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.6.4.201312101107/org.jacoco.agent-0.6.4.201312101107-runtime.jar=destfile=/home/jenkins/workspace/es_coverage_metal/jdk/JDK7/label/metal/target/jacoco.exec,excludes=jsr166e/:jsr166y/:org/apache/lucene/** and disrupts the instrumentation. One solution is to move to inherited pom.xml structure. However that requires more extensive work. a) Parent pom.xml needs to be constructed. Since jar can not be used as a parent pom. b) For child pom, configuration override and pluginManagement can be used. |
Can't you just pass what you pass to argLine to -Dtest.jvm.argline instead of the randomized stuff? that should work as well then we don't need to change anything here? |
Most likely not since argLine manipulation is done by the jacoco plug in in the build phase? I will investigate both cases. |
Simplified version submitted. The default profile will only manipulate With env "tests.jvm.argline=-server -XX:+UseG1GC -XX:+UseCompressedOops" setting mvn test 18360 ttys000 0:02.10 /usr/bin/java -Xmx512m -Xss256k -XX:MaxPermSize=128m -XX:MaxDirectMemorySize=512m -Des.logger.prefix= -server -XX:+UseG1GC -XX:+UseCompressedOops -Dtests.prefix=tests -Dtests.seed=51DBEAE652CF827F -Des.logger.level=INFO -Des.node.local= -Des.node.mode= -Djava.awt.headless=true -Djava.io.tmpdir=. -Djava.security.policy=/Users/bhwang/elasticsearch-mrsolo/dev-tools/tests.policy -Djunit4.tempDir=/Users/bhwang/elasticsearch-mrsolo/target -Dtests.appendseed= -Dtests.assertion.disabled= -Dtests.awaitsfix= -Dtests.badapples= -Dtests.class= -Dtests.client.ratio= -Dtests.cluster_seed= -Dtests.enable_mock_modules= -Dtests.failfast= -Dtests.integration= -Dtests.iters= -Dtests.jvm.argline=-server -XX:+UseG1GC -XX:+UseCompressedOops ... Run with coverage profile mvn test -Pcoverage 18385 ttys000 0:11.04 /usr/bin/java -Xmx512m -Xss256k -XX:MaxPermSize=128m -XX:MaxDirectMemorySize=512m -Des.logger.prefix= -javaagent:/Users/bhwang/.m2/repository/org/jacoco/org.jacoco.agent/0.6.4.201312101107/org.jacoco.agent-0.6.4.201312101107-runtime.jar=destfile=/Users/bhwang/elasticsearch-mrsolo/target/jacoco.exec,excludes=jsr166e/:jsr166y/:org/apache/lucene/** -Dtests.prefix=tests -Dtests.seed=A92A59D9AA01A3BC -Des.logger.level=INFO -Des.node.local= -Des.node.mode= -Djava.awt.headless=true -Djava.io.tmpdir=. -Djava.security.policy=/Users/bhwang/elasticsearch-mrsolo/dev-tools/tests.policy -Djunit4.tempDir=/Users/bhwang/elasticsearch-mrsolo/target -Dtests.appendseed= -Dtests.assertion.disabled= -Dtests.awaitsfix= -Dtests.badapples= -Dtests.class= -Dtests.client.ratio= -Dtests.cluster_seed= -Dtests.enable_mock_modules= -Dtests.failfast= -Dtests.integration= -Dtests.iters= -Dtests.jvm.argline=-server -XX:+UseG1GC -XX:+UseCompressedOops ... |
this looks much better to me @jpountz what do you think? |
I agree, +1 to merge! |
LGTM +1 bill go ahead and merge it in! |
dffc7cd merge to master only |
can you merge it to 1.x as well I'd like these branches to be as close as possible :) |
Done b38091a |
Synced flush was a brilliant idea. It supports instant recoveries with a quite small implementation. However, with the presence of sequence numbers and retention leases, it is no longer needed. This change removes it from 8.0. Relates #5077
Synced flush was a brilliant idea. It supports instant recoveries with a quite small implementation. However, with the presence of sequence numbers and retention leases, it is no longer needed. This change removes it from 8.0. Relates elastic#5077
Add logic to perform code coverage analysis using jacoco http://www.eclemma.org/jacoco/trunk/doc/
Maven profiles are used so not to disrupt the current build flow. Randomized testing plug-in is moved to the profiles because of configuration conflict if the code is instrumented by jacoco.