use of io.vertx.ext.sync.testmodel.AsyncInterfaceImpl in project vertx-sync by vert-x3.
the class TestVerticle method start.
@Override
@Suspendable
public void start() throws Exception {
ai = new AsyncInterfaceImpl(vertx);
completeChannel = Channels.newChannel(1, Channels.OverflowPolicy.THROW);
try {
String testName = config().getString("testName");
Method meth = this.getClass().getDeclaredMethod(testName);
meth.setAccessible(true);
meth.invoke(this);
} catch (AssertionError e) {
e.printStackTrace();
throw new IllegalStateException("Tests failed", e);
} catch (Exception e) {
e.printStackTrace();
throw new IllegalStateException("Failed to invoke test", e);
}
completeChannel.receive(10, TimeUnit.SECONDS);
}
Aggregations