Before you want to run any tests from this test suite for the first time,
you need to first install the vertx-it-utils
module to your local maven repo:
cd vertx-it-utils
mvn clean install
If you don't do this, the modules here won't compile because of missing dependencies (for example missing OpenshiftTestAssistant class and so on.)
If you want to use Minishift for testing, run:
minishift start --cpus=4 --memory=8192 \
--vm-driver=virtualbox
eval $(minishift docker-env)
Some tests require the oc
command line in the PATH
.
Don't forget to login as well (user developer
, password developer
):
oc login
Test in module can be executed switching to $PROJECT
directory and running
cd $PROJECT
mvn clean verify -Popenshift
Note that the productized Vert.x 3.5.1.redhat-004 uses Agroal as a default JDBC connection pool as opposed to c3p0 used in upstream 3.5.1 release. In order to use the c3p0 connection pool, you need to modify the JDBC client configuration as the c3p0 library uses different configuration keys than Agroal:
// Agroal example
JsonObject agroalConfig = new JsonObject()
.put("jdbcUrl", JDBC_URL)
.put("driverClassName", "org.postgresql.Driver")
.put("principal", JDBC_USER)
.put("credential", JDBC_PASSWORD)
.put("castUUID", true);
// c3p0 example
JsonObject c3p0Config = new JsonObject()
.put("url", JDBC_URL)
.put("driver_class", "org.postgresql.Driver")
.put("user", JDBC_USER)
.put("password", JDBC_PASSWORD)
.put("castUUID", true)
.put("provider_class", "io.vertx.ext.jdbc.spi.impl.C3P0DataSourceProvider");
Check the embedded case. An embedded HTTP server is started and tested.
Test various HTTP features (replicas, web sockets...)
Test the Vert.x service discovery.
Test the Async JDBC Client against a PostgreSQL database running in OpenShift.
Showcases different configuration stores and retrieving configuration with different options.
You need to set up maven properties, which are used for openshift route generation:
openshift.namespace
namespace which is used for testingopenshift.route.suffix
suffix which is used for route generation
Integration tests for sockjs-service-proxy module (RPC-like application).
If tests fail on SockJSProxyIT.initialize:34
try to change selenium/standalone-chrome version by maven property:
chrome.selenium.image.version
.- The default value this property is set to is
latest
- Latest known working version on OpenShift is
3.14.0-europium
- The default value this property is set to is
Tests for authentication using Vert.x JWTAuth & OAuth2 modules. JWTAuth integration tests taken from Vert.x Secured Booster. The tests use Red Hat SSO image v7.1
Tests for readiness/liveness of the pod in various scenarios (pod startup, pod restart, pod kill, ..)
Contains tests for Vert.x integration of HTTP2 features + tests for Vert.x integration of gRPC.
Integration tests for Vert.x Circuit Breaker module. The tests are taken from Vert.x Circuit Breaker Booster
Tests for Vert.x clustering - integration with Infinispan, usage of clustered event bus, ..
These tests serve as a verification that a Vert.x application running on OpenShift Online is able to communicate with an existing on-premise database as well as an internal database also running in the same OpenShift instance. The tests are divided into modules, each of which is named after the database engine used in the Vert.x application example:
mysql-it
for Vert.x and MySQL integration testspostgresql-it
for Vert.x and PostgreSQL integration testsoracle-it
for Vert.x and OracleDB integration tests - do note that due to the OracleDB being proprietary, the tests only cover communication with an existing on-premise database use case.mongodb-it
for Vert.x and MongoDB integration tests
These modules are located in the db-it
parent module. On the same level, there's also verticle-utils
module,
which contains some utility classes that are commonly used by the tests.
Integration tests for Vert.x MQTT module. This includes tests for connectivity, topic subscription and message publishing. When running the tests, a MQTT broker (server) is deployed in OpenShift and a MQTT client is created locally.
Integration tests for Vert.x Proton module. The application leverages the amq63-basic OpenShift Application template and is derived from the RHOAR AMQP messaging booster.
This module contains integration tests for Vert.x Micrometer Metrics. The test run should start a Prometheus server along with a simple Vert.x HTTP server for providing some metrics, then execute some basic tests to verify that the metrics are correct.
This module does not contain any tests, but instead provides some abstract test classes,
OpenshiftTestAssistant
class and other utility classes. You need to install this module first (described at the top of this page)
in order to be able to run any tests from this test suite.
- Login to OpenShift online with
oc
- Create OpenShift project
- Use same process as described before