fabric8io-images / s2i

OpenShift S2I images for Java and Karaf applications
Apache License 2.0
70 stars 84 forks source link

add TDD non-reg illustrating #213 problem (currently still failing) #216

Open vorburger opened 5 years ago

vorburger commented 5 years ago

DO NOT MERGE until #213 is fixed and this can be rebased..

vorburger commented 5 years ago

@muff1nman you could test your #217 against this?

Run ./test.sh and as-is on master right now, without fix, you'll see this PR clearly fail (due to #213).

If #217 if it fixed it correctly, then by (locally) rebasing / cherry-picking this one on top of that one passes.

Shout if this is not clear and ask a question and perhaps we can improve docs for contributors.

vorburger commented 5 years ago

@muff1nman following your #219 I'll rebase this, and if running ./test.sh now passes, will merge it...

vorburger commented 5 years ago

@muff1nman something here isn't quite right yet... if you wouldlike to investigate this further, note that Unrecognized VM option 'PrintGCDateStamps' at end, FYI:

+ s2i build --copy java/examples/maven s2i-java-11 s2i-java-11-maven-example --incremental
==================================================================
Starting S2I Java Build .....
S2I source build for Maven detected
Using MAVEN_OPTS '-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError'
Found pom.xml ...
Running 'mvn -Dmaven.repo.local=/tmp/artifacts/m2 package -DskipTests -Dmaven.javadoc.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Djacoco.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true -Dpmd.skip=true -Dfabric8.skip=true -e -B '
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T18:41:47Z)
Maven home: /opt/maven
Java version: 11.0.2, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-11-openjdk-11.0.2.7-0.el7_6.x86_64
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.20.13-200.fc29.x86_64", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] -----------< ch.vorburger.openshift.s2i:HttpServer-example >------------
[INFO] Building HttpServer-example 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ HttpServer-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /tmp/src/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ HttpServer-example ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /tmp/src/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ HttpServer-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /tmp/src/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ HttpServer-example ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /tmp/src/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ HttpServer-example ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ HttpServer-example ---
[INFO] Building jar: /tmp/src/target/HttpServer-example-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.259 s
[INFO] Finished at: 2019-03-19T18:26:51Z
[INFO] ------------------------------------------------------------------------
Copying Maven artifacts from /tmp/src/target to /deployments ...
Running: cp -v *.jar /deployments
'HttpServer-example-1.0-SNAPSHOT.jar' -> '/deployments/HttpServer-example-1.0-SNAPSHOT.jar'
Checking for fat jar archive...
Found HttpServer-example-1.0-SNAPSHOT.jar...
... done
Build completed successfully
+ test_container s2i-java-11-maven-example
+ test_app s2i-java-11-maven-example
+ local name=s2i-java-11-maven-example
+ local port=8080
+ local extra_args=
++ docker run --name s2i-java-11-maven-example-test -d -p 8080 s2i-java-11-maven-example
+ local container_id=44921bbb802cb87ac867c8d454803d2074d80585ac52ad35b1b7cb5d41611629
+ sleep 5
++ docker port 44921bbb802cb87ac867c8d454803d2074d80585ac52ad35b1b7cb5d41611629 8080
++ sed s/0.0.0.0://
+ local http_port=32770
++ curl --silent --show-error http://localhost:32770
+ local 'http_reply=hello, world'
+ '[' 'hello, world' = 'hello, world' ']'
+ echo 'APP TEST PASSED'
APP TEST PASSED
+ docker rm -f 44921bbb802cb87ac867c8d454803d2074d80585ac52ad35b1b7cb5d41611629
44921bbb802cb87ac867c8d454803d2074d80585ac52ad35b1b7cb5d41611629
+ return 0
+ test_app s2i-java-11-maven-example '-e JAVA_DIAGNOSTICS=TRUE'
+ local name=s2i-java-11-maven-example
+ local port=8080
+ local 'extra_args=-e JAVA_DIAGNOSTICS=TRUE'
++ docker run --name s2i-java-11-maven-example-test -d -p 8080 -e JAVA_DIAGNOSTICS=TRUE s2i-java-11-maven-example
+ local container_id=680590b96117e4ba3f6e0492a0105cc450e752fae5805543edd1739c257b311a
+ sleep 5
++ docker port 680590b96117e4ba3f6e0492a0105cc450e752fae5805543edd1739c257b311a 8080
++ sed s/0.0.0.0://
Error: No public port '8080/tcp' published for 680590b96117e4ba3f6e0492a0105cc450e752fae5805543edd1739c257b311a
+ local http_port=
++ curl --silent --show-error http://localhost:
curl: (7) Failed to connect to localhost port 80: Connection refused
+ local http_reply=
+ '[' '' = 'hello, world' ']'
+ echo 'APP TEST FAILED'
APP TEST FAILED
+ docker logs 680590b96117e4ba3f6e0492a0105cc450e752fae5805543edd1739c257b311a
Unrecognized VM option 'PrintGCDateStamps'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
+ docker rm -f 680590b96117e4ba3f6e0492a0105cc450e752fae5805543edd1739c257b311a
680590b96117e4ba3f6e0492a0105cc450e752fae5805543edd1739c257b311a
+ return -123
muff1nman commented 5 years ago

@vorburger ill try to take a look in the coming days

vorburger commented 2 years ago

Hello @muff1nman @rhuss I'm doing a year end clean up of my personal https://github.com/pulls and wanted to ask if you would still consider merging this very old Pull Request, or if we should forget about and close this? (This is a bulk message I'm posting to many issues to gauge what is still revelant.)