-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
124 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
36 changes: 36 additions & 0 deletions
36
test-framework/artemis-test/src/main/java/io/quarkus/artemis/test/ArtemisTestResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters