Skip to content

Commit

Permalink
add artemis test module
Browse files Browse the repository at this point in the history
  • Loading branch information
uaihebert committed Dec 3, 2019
1 parent 3ab024e commit 5a8448a
Show file tree
Hide file tree
Showing 12 changed files with 124 additions and 39 deletions.
46 changes: 7 additions & 39 deletions bom/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<quartz.version>2.3.2</quartz.version>
<h2.version>1.4.197</h2.version> <!-- keep 1.4.197 as newer versions have severe regressions -->
<postgresql-jdbc.version>42.2.8</postgresql-jdbc.version>
<mariadb-jdbc.version>2.5.2</mariadb-jdbc.version>
<mariadb-jdbc.version>2.4.4</mariadb-jdbc.version>
<mysql-jdbc.version>8.0.18</mysql-jdbc.version>
<mssql-jdbc.version>7.2.1.jre8</mssql-jdbc.version>
<derby-jdbc.version>10.14.2.0</derby-jdbc.version>
Expand Down Expand Up @@ -153,7 +153,6 @@
<mongo-reactivestreams-client.version>1.11.0</mongo-reactivestreams-client.version>
<artemis.version>2.10.1</artemis.version>
<okhttp.version>3.12.6</okhttp.version>
<sentry.version>1.7.28</sentry.version>
<!-- Used for integration tests, to make sure webjars work-->
<bootstrap.version>3.1.0</bootstrap.version>
<subethasmtp.version>3.1.7</subethasmtp.version>
Expand Down Expand Up @@ -300,6 +299,11 @@
<artifactId>quarkus-artemis-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-artemis</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-artemis-jms</artifactId>
Expand Down Expand Up @@ -711,11 +715,6 @@
<artifactId>quarkus-logging-json</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-sentry</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Quarkus test dependencies -->
<dependency>
Expand Down Expand Up @@ -743,16 +742,6 @@
<artifactId>quarkus-test-kubernetes-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-qute</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-qute</artifactId>
<version>${project.version}</version>
</dependency>

<!-- External dependencies -->

Expand Down Expand Up @@ -1351,11 +1340,7 @@
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>${sentry.version}</version>
</dependency>

<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
Expand Down Expand Up @@ -2478,23 +2463,6 @@
<artifactId>quarkus-vertx-graphql</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Qute -->
<dependency>
<groupId>io.quarkus.qute</groupId>
<artifactId>qute-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus.qute</groupId>
<artifactId>qute-generator</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus.qute</groupId>
<artifactId>qute-rxjava</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
4 changes: 4 additions & 0 deletions integration-tests/artemis-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-artemis-core</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-artemis</artifactId>
</dependency>

<!-- Health check -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.quarkus.artemis.test.ArtemisTestResource;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.quarkus.artemis.test.ArtemisTestResource;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.quarkus.artemis.test.ArtemisTestResource;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
Expand Down
5 changes: 5 additions & 0 deletions integration-tests/artemis-jms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-artemis-jms</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-artemis</artifactId>
<scope>test</scope>
</dependency>

<!-- Health check -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.quarkus.artemis.test.ArtemisTestResource;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.quarkus.artemis.test.ArtemisTestResource;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.quarkus.artemis.test.ArtemisTestResource;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
Expand Down
65 changes: 65 additions & 0 deletions test-framework/artemis-test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-framework</artifactId>
<version>999-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>quarkus-test-artemis</artifactId>
<name>Quarkus - Artemis - Test</name>
<description>Module that will hold all tests resources that can will be usable by Quarkus developers and users of the framework
</description>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-server</artifactId>
<version>${artemis.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-json_1.0_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.johnzon</groupId>
<artifactId>johnzon-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${project.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package io.quarkus.artemis.test;

import java.nio.file.Paths;
import java.util.Collections;
import java.util.Map;

import org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ;
import org.apache.commons.io.FileUtils;

import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;

public class ArtemisTestResource implements QuarkusTestResourceLifecycleManager {

private EmbeddedActiveMQ embedded;

@Override
public Map<String, String> start() {
try {
FileUtils.deleteDirectory(Paths.get("./target/artemis").toFile());
embedded = new EmbeddedActiveMQ();
embedded.start();
} catch (Exception e) {
throw new RuntimeException("Could not start embedded ActiveMQ server", e);
}
return Collections.emptyMap();
}

@Override
public void stop() {
try {
embedded.stop();
} catch (Exception e) {
throw new RuntimeException("Could not stop embedded ActiveMQ server", e);
}
}
}
1 change: 1 addition & 0 deletions test-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<name>Quarkus - Test Framework</name>
<packaging>pom</packaging>
<modules>
<module>artemis-test</module>
<module>common</module>
<module>h2</module>
<module>derby</module>
Expand Down

0 comments on commit 5a8448a

Please sign in to comment.