org.knowhowlab.osgi.testing
org.knowhowlab.osgi.testing copied to clipboard
assertServiceUnavailable(class, timeout) implementation does not wait the specified timeout for the service to go away
I think the implementation in
is incorrect. Instead the call must wait for the specified amount (timeout). If it sees the service to be null once within that timeframe, it should return true. Right now the call returns "false" even though i said that i expect the service goes away within the next 1000ms. E.g. because i just removed a configuration object for a managed factory service.
serviceUnavailable assertion checks if a service is not appeared in the registry within defined time, but not the final service status.
you can try assertServiceEvent() for your case to validate that service was unregistered
well why not have a convenience method for "serviceUnregistered(class,timeout)" to have a simple check that a service disapears within "timout"? sure you can always look at the events. But why bother? isnt this library all about convenience assertions?
sure, a new assertion is an option as well.
i will check ;)