Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vault tests #5026

Merged
merged 8 commits into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ concurrency:

jobs:
copyright:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -31,6 +32,7 @@ jobs:
- name: Copyright
run: etc/scripts/copyright.sh
checkstyle:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -43,6 +45,7 @@ jobs:
- name: Checkstyle
run: etc/scripts/checkstyle.sh
spotbugs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -55,6 +58,7 @@ jobs:
- name: Spotbugs
run: etc/scripts/spotbugs.sh
docs:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -67,6 +71,7 @@ jobs:
- name: Docs
run: etc/scripts/site.sh
build:
timeout-minutes: 60
strategy:
matrix:
os: [ ubuntu-latest ]
Expand All @@ -82,9 +87,10 @@ jobs:
- name: Maven build
run: etc/scripts/github-build.sh
examples:
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -100,6 +106,7 @@ jobs:
cd examples
mvn -B verify
mp-tck:
timeout-minutes: 60
name: "MicroProfile TCKs"
strategy:
matrix:
Expand All @@ -116,6 +123,7 @@ jobs:
- name: Maven build
run: etc/scripts/mp-tck.sh
archetypes:
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-latest ]
Expand All @@ -131,6 +139,7 @@ jobs:
- name: Test archetypes
run: etc/scripts/test-archetypes.sh
packaging:
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-latest, macos-latest]
Expand All @@ -143,11 +152,9 @@ jobs:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Build Helidon
run: etc/scripts/github-compile.sh
- name: JAR packaging
run: etc/scripts/test-packaging-jar.sh
- name: JLink packaging
run: etc/scripts/test-packaging-jlink.sh
- name: MP-1 test
run: tests/integration/native-image/mp-1/test-runtime.sh
- name: MP-3 test
run: tests/integration/native-image/mp-3/test-runtime.sh
22 changes: 13 additions & 9 deletions .../mp/src/main/resources/logging.properties → etc/scripts/github-compile.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash -e
#
# Copyright (c) 2021, 2022 Oracle and/or its affiliates.
# Copyright (c) 2022 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,14 +15,17 @@
# limitations under the License.
#

# Send messages to the console
handlers=io.helidon.logging.jul.HelidonConsoleHandler
# Path to this script
[ -h "${0}" ] && readonly SCRIPT_PATH="$(readlink "${0}")" || readonly SCRIPT_PATH="${0}"

# HelidonConsoleHandler uses a SimpleFormatter subclass that replaces "!thread!" with the current thread
java.util.logging.SimpleFormatter.format=%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n
# Load pipeline environment setup and define WS_DIR
. $(dirname -- "${SCRIPT_PATH}")/includes/pipeline-env.sh "${SCRIPT_PATH}" '../..'

# Global logging level. Can be overridden by specific loggers
.level=INFO
# Setup error handling using default settings (defined in includes/error_handlers.sh)
error_trap_setup

io.helidon.level=INFO
io.helidon.integrations.level=INFO
mvn ${MAVEN_ARGS} -f ${WS_DIR}/pom.xml \
install -e \
-Dmaven.test.skip=true \
-DskipTests \
-Ppipeline
Empty file modified etc/scripts/test-integ-vault.sh
100755 → 100644
Empty file.
9 changes: 0 additions & 9 deletions etc/scripts/test-packaging-jar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
# Setup error handling using default settings (defined in includes/error_handlers.sh)
error_trap_setup

mvn ${MAVEN_ARGS} --version

# Temporary workaround until job stages will share maven repository
mvn ${MAVEN_ARGS} -f ${WS_DIR}/pom.xml \
install -e \
-Dmaven.test.skip=true \
-DskipTests \
-Ppipeline

# Run native image tests
cd ${WS_DIR}/tests/integration/native-image

Expand Down
9 changes: 0 additions & 9 deletions etc/scripts/test-packaging-jlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
# Setup error handling using default settings (defined in includes/error_handlers.sh)
error_trap_setup

mvn ${MAVEN_ARGS} --version

# Temporary workaround until job stages will share maven repository
mvn ${MAVEN_ARGS} -f ${WS_DIR}/pom.xml \
install -e \
-Dmaven.test.skip=true \
-DskipTests \
-Ppipeline

# Run native image tests
cd ${WS_DIR}/tests/integration/native-image

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,17 @@ public Builder config(Config config) {
* @return updated builder instance
*/
public Builder connectTimeout(long amount, TimeUnit unit) {
configuration.connectTimeout(Duration.of(amount, unit.toChronoUnit()));
return connectTimeout(Duration.of(amount, unit.toChronoUnit()));
}

/**
* Sets new connection timeout.
*
* @param timeout connection timeout
* @return updated builder instance
*/
public Builder connectTimeout(Duration timeout) {
configuration.connectTimeout(timeout);
return this;
}

Expand All @@ -271,7 +281,17 @@ public Builder connectTimeout(long amount, TimeUnit unit) {
* @return updated builder instance
*/
public Builder readTimeout(long amount, TimeUnit unit) {
configuration.readTimeout(Duration.of(amount, unit.toChronoUnit()));
return readTimeout(Duration.of(amount, unit.toChronoUnit()));
}

/**
* Sets new read timeout.
*
* @param timeout read timeout
* @return updated builder instance
*/
public Builder readTimeout(Duration timeout) {
configuration.readTimeout(timeout);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;

Expand Down Expand Up @@ -161,7 +162,10 @@ private static void cleanup() {
}

private static void testBean(int port, String jwtToken) {
Client client = ClientBuilder.newClient();
Client client = ClientBuilder.newBuilder()
.connectTimeout(10, TimeUnit.SECONDS)
.readTimeout(10, TimeUnit.SECONDS)
.build();
WebTarget target = client.target("http://localhost:" + port);

// select a bean
Expand Down
47 changes: 0 additions & 47 deletions tests/integration/native-image/mp-1/test-runtime.sh

This file was deleted.

49 changes: 0 additions & 49 deletions tests/integration/native-image/mp-3/test-runtime.sh

This file was deleted.

24 changes: 18 additions & 6 deletions tests/integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

<name>Helidon Integration Tests</name>

<properties>
<version.lib.testcontainers>1.17.4</version.lib.testcontainers>
</properties>

<modules>
<module>tools</module>
<module>zipkin-mp-2.2</module>
Expand All @@ -57,8 +61,22 @@
<module>mp-bean-validation</module>
<module>restclient</module>
<module>native-image</module>
<module>vault</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<!-- testcontainers should only be used in integration tests -->
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${version.lib.testcontainers}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<profiles>
<profile>
<id>native-image</id>
Expand All @@ -75,11 +93,5 @@
<module>dbclient</module>
</modules>
</profile>
<profile>
<id>vault-it</id>
<modules>
<module>vault</module>
</modules>
</profile>
</profiles>
</project>
26 changes: 0 additions & 26 deletions tests/integration/vault/mp/README.md

This file was deleted.

Loading