Comments (2)
postEvent(topicX, 200, TimeUnit.MILLISECONDS) // check API for more details
assertEvent(topicX, 500, TimeUnit.MILLISECONDS)
it fires an event after a small delay in the separate Thread and assetEvent tries to catch it in the test main thread.
from org.knowhowlab.osgi.testing.
The issue I'm talking about is when I invoke a method of some component like this:
SomeService someService = ServiceUtils.getService(SomeService.class);
someService.doSomethingAsync(); // this method will fire an event within 500 ms
assertEvent(topicX, 500, TimeUnit.MILLISECONDS);
The assert may miss the event if the async method fires the event before assertEvent registers for the event. Therefore, it is neccessary to register for the event before the async method is called.
from org.knowhowlab.osgi.testing.
Related Issues (19)
- Framework Utils
- MonitorAdmin utils and assertions
- Metatype utils and assertions
- DS utils and assertions HOT 6
- Add a default message for bundle assertions HOT 2
- Add utilities and assertions for Subsystems
- Add assert methods for resources capabilities
- Add support of TestNG
- Create org.knowhowlab.osgi.testing.all artifact
- Framework Assertions
- assertServiceUnavailable(class, timeout) implementation does not wait the specified timeout for the service to go away HOT 4
- Change bundle state asynchronously with delay
- (Un)register service asynchronously with delay
- EventAdmin Utils and Assertions
- ConfigurationAdmin Utils and Assertions
- WireAdmin utils and assertions
- Preferences utils and assertions
- UserAdmin utils and assertions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org.knowhowlab.osgi.testing.