File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed
Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -6,19 +6,20 @@ services:
66 volumes :
77 - ./test/fixtures:/fixtures
88 working_dir : /fixtures
9- command : >
10- sh -c "
11- java -Xms128m -Xmx256m
12- -XX:+PrintGCDetails
13- -Xloggc:/tmp/gc.log
14- -jar buggyapp.jar &
15- sleep infinity
16- "
9+ entrypoint : ["/bin/bash", "-c"]
10+ command :
11+ - |
12+ set -e
13+ # Install procps for pgrep (needed by healthcheck)
14+ apt-get update -qq && apt-get install -y -qq procps > /dev/null 2>&1
15+ # Run buggyapp in foreground
16+ exec java -Xms128m -Xmx256m -XX:+PrintGCDetails -Xloggc:/tmp/gc.log -jar buggyapp.jar
1717 healthcheck :
18- test : ["CMD", "pgrep", " java"]
18+ test : ["CMD-SHELL ", "pgrep -f ' java.*buggyapp' || exit 1 "]
1919 interval : 5s
2020 timeout : 3s
21- retries : 5
21+ retries : 10
22+ start_period : 10s
2223
2324 # Mock yCrash server for upload testing
2425 mock-server :
Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ if [ ! -f "$FIXTURES_DIR/buggyapp.jar" ]; then
2121fi
2222
2323# Compile MyClass.java if it exists
24- if [ -f " ../../internal/agent/testdata/MyClass.java" ] && [ ! -f " $FIXTURES_DIR /MyClass.class" ]; then
24+ MYCLASS_JAVA=" $SCRIPT_DIR /../../internal/agent/testdata/MyClass.java"
25+ if [ -f " $MYCLASS_JAVA " ] && [ ! -f " $FIXTURES_DIR /MyClass.class" ]; then
2526 echo " [INFO] Compiling MyClass.java..."
26- javac -d " $FIXTURES_DIR " \
27- " ../../internal/agent/testdata/MyClass.java"
27+ javac -d " $FIXTURES_DIR " " $MYCLASS_JAVA "
2828fi
2929
3030echo " [INFO] Test fixtures ready at: $FIXTURES_DIR "
You can’t perform that action at this time.
0 commit comments