adoptium / STF

The System Test Framework for executing https://github.com/adoptium/aqa-systemtest
Apache License 2.0
8 stars 35 forks source link

Ignore JVMJ9VM090I message in java -version output #113

Closed Mesbah-Alam closed 3 years ago

Mesbah-Alam commented 3 years ago

This PR is to Ignore JVMJ9VM090I messages in java -version output.

it should fix the related issue reported in to https://github.com/eclipse/openj9/issues/12470. Meaning, next time we encounter network issues which cause java -version to output JVMJ9VM090I as below, STF would ignore it and continue.

GEN stderr Exception in thread "main" net.adoptopenjdk.stf.StfException: 'Java -version' output does not start with 'java version'. Actual output was: JVMJ9VM090I Slow response to network query (160 secs), check your IP DNS configuration
GEN stderr openjdk version "11.0.11-internal" 2021-04-20
GEN stderr OpenJDK Runtime Environment (build 11.0.11-internal+0-adhoc.jenkins.BuildJDK11ppc64aixNightly)
GEN stderr Eclipse OpenJ9 VM (build master-22fc5113773, JRE 11 AIX ppc64-64-Bit Compressed References 20210418_687 (JIT enabled, AOT enabled)
GEN stderr OpenJ9   - 22fc5113773
GEN stderr OMR      - 0f967b721d2
GEN stderr JCL      - ba1caf576ee based on jdk-11.0.11+8)

Signed-off-by: Mesbah_Alam@ca.ibm.com Mesbah_Alam@ca.ibm.com

Mesbah-Alam commented 3 years ago

Tested : internal/Grinder/14822

Note: the original issue which causes java -version to output JVMJ9VM090I was not reproducible.

Mesbah-Alam commented 3 years ago

@peter_shipton@ca.ibm.com - please review.

llxia commented 3 years ago

Does it make sense to use String.matches() with regex (openjdk|java) version? We just need to validate that java -version output contains (openjdk|java) version. Does it matter if it contains any other messages?

Mesbah-Alam commented 3 years ago

We just need to validate that java -version output contains (openjdk|java) version

The way this piece of STF code was implemented is suggestive of the fact that the people involved in coding it had decided to validate if java -version output starts with 'java version'. I have no knowledge of why they decided to do that.

If we want to change this check's criteria, we can change it to whatever we want. We just need to come to an agreement. That's all.

FYI @lumpfish

Mesbah-Alam commented 3 years ago

@llxia : As discussed at the AQAvit call, could we deliver this PR so that it unblocks build from any reoccurrence of the issue reported in https://github.com/eclipse/openj9/issues/12470?

As the next step, I'll create a second issue to remove the version check altogether and update the logic of figuring out various Java versions in JavaVersion.java to depend on Java system properties instead of parsing java -version output.

Mesbah-Alam commented 3 years ago

Issue for second step mentioned above: https://github.com/adoptium/STF/issues/114

smlambert commented 3 years ago

We are still technically in a code freeze for release week.

Mesbah-Alam commented 3 years ago

We are still technically in a code freeze for release week.

That was a slip from my side!