Skip to content
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

[ds annotation tck] 1.5 features are missing in the TCK #642

Open
laeubi opened this issue Nov 23, 2023 · 3 comments
Open

[ds annotation tck] 1.5 features are missing in the TCK #642

laeubi opened this issue Nov 23, 2023 · 3 comments
Assignees

Comments

@laeubi
Copy link
Contributor

laeubi commented Nov 23, 2023

According to https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html the follwoing new features where added:

  • Added support for AnyService. See Any Service Type.
  • Added support for satisfying conditions using the Condition Service Specification. See Satisfying Condition and Locating the True Condition Service.
  • Added support for use of Optional to hold unary references for field and constructor injection. This is primarily for optional (0..1) cardinality but can also be used with mandatory (1..1) cardinality.
  • (maybe not relevant for Annotations) Component properties from property and properties elements take precedence over the target attributes of reference elements. See Component Properties.

but I cant find a DS15AnnotationsTestCase here or any indication these are already covered by the TCK

@timothyjward
Copy link
Contributor

Added support for AnyService. See Any Service Type.

Tested here:

<reference name="serviceParam"
interface="org.osgi.service.component.AnyService"
target="(testName=static_multiple_reference)"
policy="static" cardinality="1..n"
parameter="0"/>

Added support for satisfying conditions using the Condition Service Specification. See Satisfying Condition and Locating the True Condition Service.

Added in commit 7486338

Added support for use of Optional to hold unary references for field and constructor injection. This is primarily for optional (0..1) cardinality but can also be used with mandatory (1..1) cardinality.

Tested here:

public OptionalReferenceImpl(Optional<TestObject> serviceParam,
Optional<ServiceReference<TestObject>> srParam,
Optional<ComponentServiceObjects<TestObject>> soParam,
Optional<Map<String,Object>> propsParam,
Optional<Map.Entry<Map<String,Object>,TestObject>> tupleParam) {

(maybe not relevant for Annotations) Component properties from property and properties elements take precedence over the target attributes of reference elements. See Component Properties.

Tested here:

<reference
interface="org.osgi.test.cases.component.tb11.TargetProperties"
name="ref"/>
<property
name="ref.target"
value="(serial.num=10)"/>

@laeubi
Copy link
Contributor Author

laeubi commented Jan 23, 2024

@timothyjward I'm referring to the org.osgi.test.cases.component.annotations I can't see how org.osgi.test.cases.component can cover these, please reopen the issue.

@laeubi laeubi changed the title [ds tck] 1.5 features are missing in the TCK [ds annotation tck] 1.5 features are missing in the TCK Jan 23, 2024
laeubi added a commit to laeubi/osgi that referenced this issue Feb 12, 2024
Fix osgi#637
See also osgi#642

Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@laeubi
Copy link
Contributor Author

laeubi commented Feb 12, 2024

@timothyjward @juergen-albert @stbischof please reopen this, I have reworded the title to make it clear, the TCK currently even don't allow to use the 1.5 namespace at all!

See for example this:

@timothyjward timothyjward reopened this Feb 12, 2024
stbischof pushed a commit that referenced this issue Feb 14, 2024
Fix #637
See also #642

Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants