-
Notifications
You must be signed in to change notification settings - Fork 30
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
@Startup EJB annoation problem #10
Comments
I also have the exact same problem. Any progress on this? I dont think it is related to the @startup annotation though. |
Do you mix EJB and CDI annotations? When I was removing one of them it had started working. |
It's probably starting the EJB before the @test request from Arquillian comes to start the arquillian integration. Need to change how we store and retrieve the data. |
In my case the class is a @javax.ejb.Singleton. Unfortunately I cannot remove the annotation. Are there any possible workarounds? |
I think a quick fix might be to simply move the code that creates the RuntimeData: to the private constructor here: |
In jacoco 0.6.3 problem still exists.. Quick fix helped.. but im not sure if its right way... |
How did it help?
Wouldn't you then just silently ignore some coverage data until someone sets the runtime.. ? |
Yesterday i upgraded plugin on our company projects from Alpha2 (jacoco 0.5.3) to latest with my patch for jacoco 0.6.3 and initialization at ArquillianRuntime constructor. Looks like its working (i see that on remote jboss classes are instrumented, and looks like data is gathered.. i got jacoco.exec and so on) but on our sonar instance there is no coverage from remote executions.
It had to be "dirty" fix.. better to have some data than none.. |
I tried to debug how to make that fix better and it looks like sometimes coverage data is missing. I dont know why but method _public void swapExecutionData(Object[] args)_ is sometimes not called during test. (after test neither) |
This is a In Container test, and not one that is executed on the client |
Yes.. container test... |
Could you post the test class? |
I have coverage for only first test metod in that file (in my case its diga3, first by name) But in my other more complicated system only first method from class is missed.. so im bit dumb :) I have tried on different scenarios, bot nothing helps... like
And test
|
After some extra investigation i found some clues.
What I mean almost is that when Im testing bigger project (and we are doing it by uisng arquillian-suite-extension witch one deployment) then some data is missing (for example in class DigIt only class entrace is shown as covered) Its really hard to tell why, mayby i will have some time for further investigation, but mayby you have any ideas? |
Hi,
I have som ejb beans which are marked with @startup annotation. When I try to run Arquillian tests in managed container and I try to measure code coverage with arquillian jacoco extension I get following exception.
I have some example project with this case. If you want to see it I can send you zip project.
Cheers,
Dominik
The text was updated successfully, but these errors were encountered: