Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/jolokia-1.6.2-source.tar.gz
|
/jolokia-1.6.2-source.tar.gz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
9dd4cf744b6a58829b97d72a7f3badd727e65f93 SOURCES/jolokia-1.6.2-source.tar.gz
|
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (jolokia-1.6.2-source.tar.gz) = 2e1649000cbddf3b2706c535d5ec03702a91ff7ea07748e4b3b07cf8249eaafc35923271be5c91d7bd57f4d772edc0ff69a642f20c59f8cf51826e953719b7b0
|
54
tests/smoke_test.sh
Executable file
54
tests/smoke_test.sh
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
JAVA=$1
|
||||||
|
JAVA_VER=$2
|
||||||
|
AGENT_VERSION="1.6.2"
|
||||||
|
dir=$(mktemp -d)
|
||||||
|
pushd $dir
|
||||||
|
cat > jolokia_config.properties <<EOF
|
||||||
|
port=7777
|
||||||
|
host=localhost
|
||||||
|
user=foo
|
||||||
|
password=bar
|
||||||
|
EOF
|
||||||
|
cat > HelloWait.java <<EOF
|
||||||
|
public class HelloWait {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello World");
|
||||||
|
try {
|
||||||
|
while (true) {
|
||||||
|
Thread.sleep(200);
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
javac HelloWait.java
|
||||||
|
$JAVA/bin/java -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=jolokia_config.properties -cp . HelloWait > hello_wait.out 2>&1 &
|
||||||
|
num_tries=0
|
||||||
|
while [ $num_tries -lt 10 ] && ! grep -q 'Hello World' hello_wait.out; do
|
||||||
|
sleep 1
|
||||||
|
num_tries=$(($num_tries + 1))
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
if [ $num_tries -eq 10 ]; then
|
||||||
|
echo "Time out reached waiting for HelloWait to come up"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
curl -s --user foo:bar http://127.0.0.1:7777/jolokia/ 2>&1 | tee jolokia.out
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
grep -q "\"agent\":\"$AGENT_VERSION\"" jolokia.out
|
||||||
|
grep -q '"status":200' jolokia.out
|
||||||
|
popd
|
||||||
|
rm -rf $dir
|
||||||
|
|
||||||
|
# Cleanup HelloWait process
|
||||||
|
kill $(jps | grep HelloWait | awk '{ print $1 }')
|
||||||
|
|
||||||
|
echo "JDK $JAVA_VER: Tests PASSED!"
|
16
tests/tests.yml
Normal file
16
tests/tests.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
required_packages:
|
||||||
|
- jolokia-jvm-agent
|
||||||
|
- curl
|
||||||
|
- java-1.8.0-openjdk-devel
|
||||||
|
- java-11-openjdk-devel
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- agent_smoke_test:
|
||||||
|
dir: .
|
||||||
|
run: "./verify.sh"
|
7
tests/verify.sh
Executable file
7
tests/verify.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Verify Jolokia JVM agent on JDK 8 and JDK 11
|
||||||
|
set -e
|
||||||
|
|
||||||
|
./smoke_test.sh /usr/lib/jvm/java-1.8.0-openjdk 8
|
||||||
|
./smoke_test.sh /usr/lib/jvm/java-11-openjdk 11
|
Loading…
Reference in New Issue
Block a user