Code Monkey home page Code Monkey logo

org.knowhowlab.osgi.testing's People

Contributors

dpishchukhin avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

org.knowhowlab.osgi.testing's Issues

Need way to assert EventAdmin events when triggered by test code

See https://groups.google.com/forum/#!topic/knowhowlab-osgi-testing/gXRpKRTTL3s

Basically there needs to be a way to assert that an event is posted when the event will be triggered by a call from the test code itself. The following will likely miss the event.

fireEvent(topicX);
assertEvent(topicX, 500);

And the following will fail before the event is ever fired:

assertEvent(topicX, 500);
fireEvent(topicX);

Perhaps something like:

EventListener listener = new EventListener(topicX, filter);
fireEvent(topicX);
listener.assertEvent(500);

Add a default message for bundle assertions

when using any bundle assertion method, as the assertBundleAvailable("org.my.bundle", new Version("6.0.0")) and it fails then I get this kind of message:
java.lang.AssertionError: null

Would be nice to get a default message, probably "Bundle 'org.my.bundle' is not available"

Add assert methods for resources capabilities

now that osgi 6 is out with consolidated support of resources capabilities, would be good to have methods to assert that the bundle provides or requires the right capabilities (between others) at IT runtime...

assertServiceUnavailable(class, timeout) implementation does not wait the specified timeout for the service to go away

I think the implementation in

https://github.com/dpishchukhin/org.knowhowlab.osgi.testing/blob/master/org.knowhowlab.osgi.testing.assertions/src/main/java/org/knowhowlab/osgi/testing/assertions/ServiceAssert.java#L455

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.