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
CDITests.testCDIInjectContexts #49
Comments
Noting my response from the ML: https://www.eclipse.org/lists/jakartabatch-dev/msg00297.html, I agree with the challenge. It's a shame we didn't catch the misinterpretation of batchlet return value as exit status earlier but we should at least change the TCK test as Cheng suggested. |
Will a new TCK be released to address this? |
@scottkurz This issue causes 6 test failures in total (3 in ejb vehicle, 3 in web vehicle). I assume we'd want to patch it in a new maintenance release, since the other option (excluding them) seems loss of important coverage. Do you have ETA when such patch will be available? Thanks! |
I didn't want to give an ETA until I was actually working on this. I am now. In reading the TCK process it seems there's no option to accept a challenge by fixing or modifying a test. The only option (besides rejecting) is to declare an exclusion. I can certainly see the logic in such an interpretation, since otherwise already certified implementations could potentially have to re-run against the updated test(s). @scottmarlow is that your take on this as well? Anyway, let me give some thought on how to translate the "exclude list" idea into something concrete. FWIW, I hadn't realized how prescriptive the TCK process was on the subject of the exclude list: Adding excluded testsExcluded tests should be added back in for every major Jakarta EE release by emptying the test exclude list for every Specification developed in the respective major EE release. One might say that by having In any case, I'll put together something for review in this PR and add you, Scott, and @chengfang as reviewers. Thanks. |
Please look at the last sentence that I am copying from the TCK Process document:
The last sentence is general enough that you could manage creating TCK updates that:
If you have feedback on ^ please share feedback your thoughts on https://www.eclipse.org/lists/jakarta.ee-spec mailing list as #2 + #3 is something that we just talked about at the Jakarta Specification call this week. The Platform TCK mailing list could also be used for feedback on ^ as an alternative to discussing your feedback on this issue. Hope that helps! |
Signed-off-by: Scott Kurz <skurz@us.ibm.com>
Signed-off-by: Scott Kurz <skurz@us.ibm.com>
Thank you @scottmarlow for adding the detailed comments. Yes, I absolutely do feel like this change in safe and so will treat this as case 2. in your comment, and work to fix the test in a 2.1 TCK update (v2.1.1). The rationale here:
Still, there's always room for error and the introduction of some risk. I may have done the manual testing incorrectly or made an incorrect assumption in this chain of logic. But... we did get PR reviews. And... there'd be similarly some amount of risk for updating an automated exclude mechanism. I'll be happy to give feedback on one of the suggested forums when this is done. Thanks again. |
The relevant specification version and section number(s): 2.1
The coordinates of the challenged test(s): com.ibm.jbatch.tck.tests.jslxml.CDITests.testCDIInjectContexts
The exact TCK version: 2.1
The implementation being tested, including name and company: JBeret, by Red Hat, Inc.
A full description of why the test is invalid and what the correct behavior is believed to be:
Any supporting material; debug logs, test output, test logs, run scripts, etc.:
I noticed 2 issues with TCK test CDITests.testCDIInjectContexts:
1, this test uses a batchlet DependentScopedBatchletContexts which injects JobContext and StepContext in various ways (field, constructor, and method injections). But all fields are already annotated with @Inject, which means they are already field-injected. So even if one implementation does not support method or constructor injection, the target field already contains the expected value. So we should tighten this test by removing the @Inject from those fields receiving constructor or method injections.
2, step exit status from process() method return value, or StepContext.setExitStatus(...)?
A batchlet step can get its exit status from either process() method return value, or StepContext.setExitStatus(), but which takes precedence? The test assumes setExitStatus(...) wins and ignore the return value. I couldn't find a clear language in the spec.
One may argue that setExitStatus() call is more explicit so it should win. But return value from process() is equally strong in this regard, since this is exactly the purpose of this return value, and no other use of this return value exists.
I suggest we change the test such that the batchlet process method returns the same value as the value in setExitStatus(), and the test always receives the consistent exit status.
The text was updated successfully, but these errors were encountered: