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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vorburger
Copy link
Collaborator

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

@vorburger
Copy link
Collaborator Author

@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
Copy link
Collaborator Author

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

@vorburger
Copy link
Collaborator Author

@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
Copy link
Contributor

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

@@ -6,8 +6,9 @@ set -ex
function test_app() {
local name=$1
local port="8080"
local extra_args=${2:-""}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just leave out "" (that's the default anyway)

@vorburger
Copy link
Collaborator Author

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants