-
Notifications
You must be signed in to change notification settings - Fork 45
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
Create tests to verify that Startup and Shutdown events are fired #353
Comments
I vaguely recall we debated that for a bit and thought it's probably one of those things that are really hard to test. At least in case of |
Hmm, I don't remember. Maybe this was simply forgotten it the barrage of API and TCK changes? I really can't imagine why we wouldn't add any test whatsoever. We should be able to test both event for CDI SE. Any volunteers to write that test? We can add it as part of the next release (some SP1 or however we call those). |
I have assigned this to myself and will look at adding some tests. |
I added a Startup event observer to the org.jboss.cdi.tck.tests.event.observer.priority.contextLifecycleEvent.ApplicationScopedObserver class and updated the ApplicationContextLifecycleEventObserverOrderingTest to verify that a Startup event was seen, and it is not in Weld 5.0.0.CR1. I checked out the 5.0.0.CR1 tag, and updated the jboss-tck-runner pom.xml to use the 4.0.1-SNAPSHOT cdi-tck-core-impl tests, and ran against a startup-suite.xml file containing only the org.jboss.cdi.tck.tests.event.observer.priority.contextLifecycleEvent.* package:
Running this produces:
|
So if Weld 5.0.0.CR1 really does not support the Startup/Shutdown events and we have no tests in the TCK, we really should respin the 4.0.0 release and restart the current ballot. |
@starksm64 I am aware of it, see https://issues.redhat.com/browse/WELD-2709 |
Even though Weld 5.0.0.CR1 supports the event, we still have no tests, which is enough to void the current ballot. I think I will need to go ahead to cancel the ballot @starksm64. Agree? |
I think we should reset with a Weld 5.0.0.CR2 and new 4.0.0 release. I can't make the next CDI meeting if we want to discuss there as I have an all day engineering meeting. |
I can not find any CDI 4.0.0 TCK tests that actually validate that the new Startup and Shutdown events are correctly fired.
The events were added to the API and spec here: jakartaee/cdi#543
At the moment in 4.0.0, there is a single reference to Startup in a BCE test but I do not think that test checks the event was fired, only that an observer is present
https://github.com/eclipse-ee4j/cdi-tck/blob/d78a11a2dabac738f9bfa1bc3a82a6ae1f3df52c/impl/src/main/java/org/jboss/cdi/tck/tests/build/compatible/extensions/registration/MyServiceFoo.java#L14
The text was updated successfully, but these errors were encountered: