This repository has been archived by the owner on Oct 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
add dev mode IT #401
Open
awisniew90
wants to merge
1
commit into
MicroShed:master
Choose a base branch
from
awisniew90:devIT
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add dev mode IT #401
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
124 changes: 124 additions & 0 deletions
124
boost-maven/boost-maven-plugin/src/it/test-liberty-dev-mode/pom.xml
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,124 @@ | ||
<?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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>io.openliberty.tools.it</groupId> | ||
<artifactId>test-liberty-dev-mode</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<maven.compiler.source>1.7</maven.compiler.source> | ||
<maven.compiler.target>1.7</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.openliberty.tools</groupId> | ||
<artifactId>liberty-maven-plugin</artifactId> | ||
<version>3.0.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>2.19.1</version> | ||
<configuration> | ||
<redirectTestOutputToFile>true</redirectTestOutputToFile> | ||
<forkMode>once</forkMode> | ||
<forkedProcessTimeoutInSeconds>1200</forkedProcessTimeoutInSeconds> | ||
<argLine>-enableassertions</argLine> | ||
<workingDirectory>${project.build.directory}</workingDirectory> | ||
<includes> | ||
<include>**/*Test.java</include> | ||
</includes> | ||
<systemPropertyVariables> | ||
<mavenPluginVersion>@pom.version@</mavenPluginVersion> | ||
<runtimeVersion>${runtimeVersion}</runtimeVersion> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this runtimeVersion value coming from? (Our ITs are mostly not parameterized w/ runtime version) |
||
</systemPropertyVariables> | ||
<trimStackTrace>false</trimStackTrace> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>integration-test</id> | ||
<goals> | ||
<goal>integration-test</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>verify</id> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>verify</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.19.1</version> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>test-jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess if it's probably easier to leave these in though you'd think we'll only use 'ol' |
||
<profile> | ||
<id>ol</id> | ||
<activation> | ||
<property> | ||
<name>boostRuntime</name> | ||
<value>ol</value> | ||
</property> | ||
</activation> | ||
</profile> | ||
<profile> | ||
<id>wlp</id> | ||
<activation> | ||
<property> | ||
<name>boostRuntime</name> | ||
<value>wlp</value> | ||
</property> | ||
</activation> | ||
</profile> | ||
<profile> | ||
<id>tomee</id> | ||
<activation> | ||
<property> | ||
<name>boostRuntime</name> | ||
<value>tomee</value> | ||
</property> | ||
</activation> | ||
<properties> | ||
<skipITs>true</skipITs> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
20 changes: 20 additions & 0 deletions
20
boost-maven/boost-maven-plugin/src/it/test-liberty-dev-mode/resources/SystemHealth.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,20 @@ | ||
package com.demo; | ||
|
||
import javax.enterprise.context.ApplicationScoped; | ||
import org.eclipse.microprofile.health.Health; | ||
import org.eclipse.microprofile.health.HealthCheck; | ||
import org.eclipse.microprofile.health.HealthCheckResponse; | ||
|
||
@Health | ||
@ApplicationScoped | ||
public class SystemHealth implements HealthCheck { | ||
@Override | ||
public HealthCheckResponse call() { | ||
if (!System.getProperty("wlp.server.name").startsWith("defaultServer")) { | ||
return HealthCheckResponse.named(HelloWorld.class.getSimpleName()) | ||
.withData("default server", "not available").down().build(); | ||
} | ||
return HealthCheckResponse.named(HelloWorld.class.getSimpleName()).withData("default server", "available").up() | ||
.build(); | ||
} | ||
} |
178 changes: 178 additions & 0 deletions
178
...maven/boost-maven-plugin/src/it/test-liberty-dev-mode/resources/basic-dev-project/pom.xml
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,178 @@ | ||
<?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"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>boost.it</groupId> | ||
<artifactId>dev-sample-proj</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>war</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<maven.compiler.source>1.7</maven.compiler.source> | ||
<maven.compiler.target>1.7</maven.compiler.target> | ||
<boost_http_port>9000</boost_http_port> | ||
</properties> | ||
|
||
<pluginRepositories> | ||
<!-- Configure Sonatype OSS Maven snapshots repository --> | ||
<pluginRepository> | ||
<id>sonatype-nexus-snapshots</id> | ||
<name>Sonatype Nexus Snapshots</name> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.microshed.boost.boms</groupId> | ||
<artifactId>mp14-bom</artifactId> | ||
<version>RUNTIME_VERSION</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So that @pom.version@ thing doesn't work here? (I still haven't found the doc for that mechanism) |
||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<!-- Boosters --> | ||
<dependency> | ||
<groupId>org.microshed.boost.runtimes</groupId> | ||
<artifactId>openliberty</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.microshed.boost.boosters</groupId> | ||
<artifactId>jaxrs</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.microshed.boost.boosters</groupId> | ||
<artifactId>jsonp</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.microshed.boost.boosters</groupId> | ||
<artifactId>cdi</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.microshed.boost.boosters</groupId> | ||
<artifactId>mp-config</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.microshed.boost.boosters</groupId> | ||
<artifactId>mp-rest-client</artifactId> | ||
</dependency> | ||
<!-- <dependency> | ||
<groupId>org.microshed.boost.boosters</groupId> | ||
<artifactId>mp-health</artifactId> | ||
</dependency> --> | ||
<!-- For tests --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.cxf</groupId> | ||
<artifactId>cxf-rt-rs-client</artifactId> | ||
<version>3.2.6</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.cxf</groupId> | ||
<artifactId>cxf-rt-rs-extension-providers</artifactId> | ||
<version>3.2.6</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish</groupId> | ||
<artifactId>javax.json</artifactId> | ||
<version>1.0.4</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>3.2.2</version> | ||
<configuration> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
<packagingExcludes>pom.xml</packagingExcludes> | ||
</configuration> | ||
</plugin> | ||
<!-- Plugin to run unit tests --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>3.0.0-M1</version> | ||
<executions> | ||
<execution> | ||
<phase>test</phase> | ||
<id>default-test</id> | ||
<configuration> | ||
<excludes> | ||
<exclude>**/it/**</exclude> | ||
</excludes> | ||
<reportsDirectory>${project.build.directory}/test-reports/unit</reportsDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- Enable Boost plugin --> | ||
<plugin> | ||
<groupId>org.microshed.boost</groupId> | ||
<artifactId>boost-maven-plugin</artifactId> | ||
<version>RUNTIME_VERSION</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>package</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- Plugin to run functional tests --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>3.0.0-M1</version> | ||
<executions> | ||
<execution> | ||
<phase>integration-test</phase> | ||
<id>integration-test</id> | ||
<goals> | ||
<goal>integration-test</goal> | ||
</goals> | ||
<configuration> | ||
<includes> | ||
<include>**/it/**/*.java</include> | ||
</includes> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>verify-results</id> | ||
<goals> | ||
<goal>verify</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<summaryFile>${project.build.directory}/test-reports/it/failsafe-summary.xml</summaryFile> | ||
<reportsDirectory>${project.build.directory}/test-reports/it</reportsDirectory> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
8 changes: 8 additions & 0 deletions
8
.../test-liberty-dev-mode/resources/basic-dev-project/src/main/java/com/demo/HelloWorld.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,8 @@ | ||
package com.demo; | ||
|
||
public class HelloWorld { | ||
|
||
public String helloWorld() { | ||
return "helloWorld"; | ||
} | ||
} |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really have LMP as a dependency? That seems surprising.. Is the version meaningful (e.g used to run the child POM in the test) or is this just like a "recent-enough version to compile against"?