Java Code Examples for io.vertx.mutiny.core.Vertx#vertx()

The following examples show how to use io.vertx.mutiny.core.Vertx#vertx() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpMessageTest.java    From smallrye-reactive-messaging with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() {
    vertx = Vertx.vertx();
    Map<String, Object> map = new LinkedHashMap<>();
    map.put("url", "http://localhost:8089/items");
    sink = new HttpSink(vertx, new HttpConnectorOutgoingConfiguration(new HttpConnectorConfig("foo", map)));
}
 
Example 2
Source File: AmqpTestBase.java    From smallrye-reactive-messaging with Apache License 2.0 5 votes vote down vote up
@Before
public void setup() {
    executionHolder = new ExecutionHolder(Vertx.vertx());
    host = artemis.getContainerIpAddress();
    port = artemis.getMappedPort(5672);
    System.setProperty("amqp-host", host);
    System.setProperty("amqp-port", Integer.toString(port));
    System.setProperty("amqp-user", username);
    System.setProperty("amqp-pwd", password);
    usage = new AmqpUsage(executionHolder.vertx(), host, port);
    SmallRyeConfigProviderResolver.instance().releaseConfig(ConfigProvider.getConfig());
    MapBasedConfig.clear();
}
 
Example 3
Source File: MqttTestBase.java    From smallrye-reactive-messaging with Apache License 2.0 5 votes vote down vote up
@Before
public void setup() {
    System.clearProperty("mqtt-host");
    System.clearProperty("mqtt-port");
    System.clearProperty("mqtt-user");
    System.clearProperty("mqtt-pwd");
    vertx = Vertx.vertx();
    address = mosquitto.getContainerIpAddress();
    port = mosquitto.getMappedPort(1883);
    System.setProperty("mqtt-host", address);
    System.setProperty("mqtt-port", Integer.toString(port));
    usage = new MqttUsage(address, port);
}
 
Example 4
Source File: SecureMqttTestBase.java    From smallrye-reactive-messaging with Apache License 2.0 5 votes vote down vote up
@Before
public void setup() {
    mosquitto.followOutput(new Slf4jLogConsumer(LoggerFactory.getLogger("mosquitto")));
    vertx = Vertx.vertx();
    address = mosquitto.getContainerIpAddress();
    port = mosquitto.getMappedPort(1883);
    System.setProperty("mqtt-host", address);
    System.setProperty("mqtt-port", Integer.toString(port));
    System.setProperty("mqtt-user", "user");
    System.setProperty("mqtt-pwd", "foo");
    usage = new MqttUsage(address, port, "user", "foo");
}
 
Example 5
Source File: ExecutionHolder.java    From smallrye-reactive-messaging with Apache License 2.0 5 votes vote down vote up
@Inject
public ExecutionHolder(Instance<Vertx> instanceOfVertx) {
    if (instanceOfVertx == null || instanceOfVertx.isUnsatisfied()) {
        internalVertxInstance = true;
        this.vertx = Vertx.vertx();
        log.vertXInstanceCreated();
    } else {
        this.vertx = instanceOfVertx.get();
    }
}
 
Example 6
Source File: AwsSnsTestBase.java    From smallrye-reactive-messaging with Apache License 2.0 5 votes vote down vote up
@Before
public void setup() {
    executionHolder = new ExecutionHolder(Vertx.vertx());
    ip = CONTAINER.getContainerIpAddress();
    port = CONTAINER.getMappedPort(9911);
    LOGGER.debugf("Container IP [%s] port [%d]", ip, port);
}
 
Example 7
Source File: MailerImplTest.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BeforeAll
static void startWiser() {
    wiser = new Wiser();
    wiser.setPort(0);
    wiser.start();

    vertx = Vertx.vertx();
}
 
Example 8
Source File: EventbusTestBase.java    From smallrye-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Before
public void setup() {
    vertx = Vertx.vertx();
    usage = new EventBusUsage(vertx.eventBus().getDelegate());
}
 
Example 9
Source File: VertxProducer.java    From smallrye-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Produces
@ApplicationScoped
Vertx vertx() {
    return Vertx.vertx();
}
 
Example 10
Source File: KafkaTestBase.java    From smallrye-reactive-messaging with Apache License 2.0 4 votes vote down vote up
@Before
public void setup() {
    vertx = Vertx.vertx();
}
 
Example 11
Source File: AttachmentTest.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@BeforeAll
static void init() {
    vertx = Vertx.vertx();
}
 
Example 12
Source File: MockMailerImplTest.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@BeforeAll
static void start() {
    vertx = Vertx.vertx();
}