Closed bjhargrave closed 4 years ago
Comment author: Georgi Boyvalenkov <georgi.boyvalenkov@bosch-si.com>
There are several problems(DeclarativeServicesControl):
testServiceComponentRuntimeEnablement At line 3283 - test must wait for the promise to complete before checking the result.
testBadFieldReference130 Field badUpdate of org.osgi.test.cases.component.tb24.BadFieldReceiver seems to be of correct type, but the test case expects that no service is injected.
testMinimumCardinality110 In org.osgi.test.cases.component.tb21.Receiverv11 policy-option="greedy" is missing.
testStaticScalarFieldReferenceModified130 At line 4831 it is expected that a component is reactived by a configuration change, but this is not required by specification(112.7.1). Component configuration does not become unsatisfied by changing value of org.osgi.test.cases.component.tb24 property.
Comment author: @bjhargrave
CPEG call: BJ to investigate.
Comment author: @bjhargrave
(In reply to Georgi Boyvalenkov from comment BZ#0)
There are several problems(DeclarativeServicesControl):
- testServiceComponentRuntimeEnablement At line 3283 - test must wait for the promise to complete before checking the result.
Fixed by https://osgi.org/gitweb/build.git/commit/744bf6261e0ccca36e83d68d3689eba9f675df29
- testBadFieldReference130 Field badUpdate of org.osgi.test.cases.component.tb24.BadFieldReceiver seems to be of correct type, but the test case expects that no service is injected.
The test is correct.
The field is defined as:
private volatile Set
But the reference in the XML defines it as field-option="update" which means the code must have initialized the field to a value which SCR will update.
- testMinimumCardinality110 In org.osgi.test.cases.component.tb21.Receiverv11 policy-option="greedy" is missing.
I don't see why policy-option="greedy" is needed here. The component has a minimum cardinality of 2 and the test ensure the static reference activate when 2 service are present and deactivates when less than 2 services are present. Greediness has no bearing in this test.
- testStaticScalarFieldReferenceModified130 At line 4831 it is expected that a component is reactived by a configuration change, but this is not required by specification(112.7.1). Component configuration does not become unsatisfied by changing value of org.osgi.test.cases.component.tb24 property.
The test case is correct. Since the configuration-policy is not ignore, setting a configuration for the component must cause SCR to react since the component now has modified component properties which must be visible in the component's component properties.
Original bug ID: BZ#3127 From: Georgi Boyvalenkov <georgi.boyvalenkov@bosch-si.com> Reported version: R6