You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because the test-case assumes that the block that is executed under the coordinator results in no event being generated as it creates a configuration and then afterwards delete it.
If configurations are created, updated or deleted and an implicit coordination exists, the Configuration Admin service must delay notifications until the coordination terminates. However the configuration changes must be persisted immediately. Updating a Managed Service or Managed Service Factory and informing asynchronous listeners is delayed until the coordination terminates
What now happens with equinox that the updated method is called twice, once outside the coordination and one after the coordination terminates, because actually something was happening (configuration got deleted) and the "delayed notification at termination" is exactly this.
Given that a ManagedService must be prepared to be called multiple times with null configuration (e.g. when the ConfigurationAdmin is restarted) and the ConfigAdmin should be stateless in regards to what it has offered to the service, I think this is also a valid behavior.
I therefore think the assertion should be that the number of event is not larger than 2 and each value is false.
The text was updated successfully, but these errors were encountered:
laeubi
added a commit
to laeubi/osgi
that referenced
this issue
Apr 27, 2024
Currently Equinox fails this Coordinator TCK test-case:
osgi/org.osgi.test.cases.cm/src/org/osgi/test/cases/cm/junit/CMCoordinationTestCase.java
Lines 384 to 441 in 11d440e
the reason is that here is is asserted that exactly one event is triggered:
osgi/org.osgi.test.cases.cm/src/org/osgi/test/cases/cm/junit/CMCoordinationTestCase.java
Line 439 in 11d440e
because the test-case assumes that the block that is executed under the coordinator results in no event being generated as it creates a configuration and then afterwards delete it.
But the specification says (even though its quite vague):
What now happens with equinox that the
updated
method is called twice, once outside the coordination and one after the coordination terminates, because actually something was happening (configuration got deleted) and the "delayed notification at termination" is exactly this.Given that a
ManagedService
must be prepared to be called multiple times withnull
configuration (e.g. when the ConfigurationAdmin is restarted) and the ConfigAdmin should be stateless in regards to what it has offered to the service, I think this is also a valid behavior.I therefore think the assertion should be that the number of event is not larger than 2 and each value is
false
.The text was updated successfully, but these errors were encountered: