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

bucket4j-hazelcast:7.6.0 UAT is getting failed while using mvn test #1

Open
shivsrivastava opened this issue Mar 21, 2024 · 26 comments
Labels
question Further information is requested

Comments

@shivsrivastava
Copy link

Hi Team,

I am making the build with UAT enabled of submodule bucket4j-hazelcast:7.6.0. I am using the below version.

Maven command - mvn test
Maven version I am trying - 3.3.1 and above.
JDK version- 8 , 11 and 17

Let me know which java version , Maven version and test command it will work?
I have also included log. Error we are getting.
build-bucket4j-hazelcast-7.6.0-2024-02-28-06-09-59-242-6273909608.txt

"[14 15:47:08.368] | [INFO] Running io.github.bucket4j.BlockingStrategyTest
[14 15:47:10.402] | [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.029 s - in io.github.bucket4j.BlockingStrategyTest
[14 15:47:10.403] | [INFO] Running io.github.bucket4j.util.concurrent.BatchHelperSpecification
[14 15:47:10.630] | [ERROR] Tests run: 8, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.222 s <<< FAILURE! - in io.github.bucket4j.util.concurrent.BatchHelperSpecification
[14 15:47:10.630] | [ERROR] test success async case(io.github.bucket4j.util.concurrent.BatchHelperSpecification) Time elapsed: 0.004 s <<< ERROR!
[14 15:47:10.630] | java.lang.reflect.InaccessibleObjectException: Unable to make java.util.concurrent.CompletableFuture(java.lang.Object) accessible: module java.base does not "opens java.util.concurrent" to unnamed module @6f29c911
[14 15:47:10.630] | at io.github.bucket4j.util.concurrent.BatchHelperSpecification.test success async case(BatchHelperSpecification.groovy:27)"

Please help.

@vladimir-bukhtoyarov
Copy link
Contributor

vladimir-bukhtoyarov commented Mar 21, 2024

What is UAT? How I can enable it? What is the JVM vendor/version and JVM arguments? Did you see there?

@vladimir-bukhtoyarov
Copy link
Contributor

Should be moved to discussions.

@shivsrivastava
Copy link
Author

shivsrivastava commented Mar 22, 2024

I tried with JDK 8 , 11 and 17 . Do u want specific version? .
I tried with mvn test command and it got failed.
I want to run test cases of it.
I used maven version 3.3.1 and above

@vladimir-bukhtoyarov
Copy link
Contributor

What is UAT?

@vladimir-bukhtoyarov
Copy link
Contributor

vladimir-bukhtoyarov commented Mar 22, 2024

I tried with JDK 8 , 11 and 17 . Do u want specific version?

Sorry, but I can not believe in that this test is failed on Java 8. Please double check prior writting. JPMS was even not exists in Java 8. Tests can not fail on Java8, because JPMS was introduced in Java 9.

As I can see from attachement, only groovy based tests were failed. And only bucket4j-core module was run, another submodules was skipped

image

So I totally do not understand why issue is named bucket4j-hazelcast:7.6.0 UAT is getting failed while using mvn test, there is no problems with Hazelcast, build even not reached this module.

Anyway, errors in your logs are self-describable, each fail is caused by java.lang.reflect.InaccessibleObjectException, for example
image
That means that you use Java 17(or higher) where reflection is prohibited for unnamed modules. So you have to use Java 11 to make tests passed on master, but for your case you should to use java 8 because you test legacy branch 7.6 that is targeted for java 8 https://github.com/bucket4j/bucket4j/blob/7.6/bucket4j-parent/pom.xml#L48C9-L49C59


If you want to stay at java 17 then you need to modify configuration of maven-surefire-plugin there https://github.com/bucket4j/bucket4j/blob/master/bucket4j-parent/pom.xml#L162 by adding following lines:

<argLine>--add-opens java.base/java.time=ALL-UNNAMED</argLine>
<argLine>--add-opens java.base/java.math=ALL-UNNAMED</argLine>
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
<argLine>--add-opens java.base/java.lang.reflect=ALL-UNNAMED</argLine>

But success is not guaranteed because, build was never tests aginst java17

@shivsrivastava
Copy link
Author

Rechecked , I am using java 8 and tried maven version apache-maven-3.8.5 but UT is getting failed.

@vladimir-bukhtoyarov vladimir-bukhtoyarov added the question Further information is requested label Mar 28, 2024
@vladimir-bukhtoyarov
Copy link
Contributor

Rechecked , I am using java 8 and tried maven version apache-maven-3.8.5 but UT is getting failed.

Check it again, InaccessibleObjectException introduced since Java 9, it can not be thrown from Java 8.

image

If you return yet another time without clear context, I will ban you permamently.

@shivsrivastava
Copy link
Author

Rechecked , I am using java 8 and tried maven version apache-maven-3.8.5 but UT is getting failed.

Check it again, InaccessibleObjectException introduced since Java 9, it can not be thrown from Java 8.

image

If you return yet another time without clear context, I will ban you permamently.

Sure . Will check and confirm.

@shivsrivastava
Copy link
Author

shivsrivastava commented Apr 2, 2024

Checked and confirmed. and Tried on jdk 8 but still got failed.

@vladimir-bukhtoyarov
Copy link
Contributor

vladimir-bukhtoyarov commented Apr 2, 2024

Checked and confirmed. and Tried on jdk 8 but still got failed.

This is the last warning prior permament ban. With which errors build failed? Where is build log? Where is evidance in build log, that build was executed on Java 8?

@devidandupati
Copy link

while building the ut facing same issue I tried mention jdk

@meetankit24
Copy link

At last i also got UT failure with OpenJDK18 and Maven 3.9.6

@sourabhmagdum45
Copy link

I also got UT failure with OpenJDK17,8 and Maven 3.9.6

@vladimir-bukhtoyarov
Copy link
Contributor

I also got UT failure with OpenJDK17,8 and Maven 3.9.6

@sourabhmagdum45 please do not give up. Try 19, 20, 21 and do not forget about 9,10,11,12,13,14,15,16,17.
It will be extremelly productive for spending time to build project that is addressed for 1.8 on such versions. Also I will be glad to know who also employed at your company. Let another colleagues do the same and answer to this thread.

@vladimir-bukhtoyarov
Copy link
Contributor

vladimir-bukhtoyarov commented Apr 4, 2024

Anyway, I am glad to meat with everybody in this thread, and I want to offer to play game that is very popular in Russia. Game is called Find black cat inside black room. The cat is java.lang.reflect.InaccessibleObjectException. The room is Openjdk 8 Repository. I have a few T-shirt with Bucket4j logo. Guy who first find the cat will win a prize, I will send it by mail. I had tried to find a cat, but I failed.

T-shirt with Bucket4j logo is awaiting you

image

@vladimir-bukhtoyarov vladimir-bukhtoyarov transferred this issue from bucket4j/bucket4j Apr 5, 2024
@shivsrivastava
Copy link
Author

I have attached log here . Please find it .
build-bucket4j-hazelcast-7.6.0-2024-02-28-06-09-59-242-6273909608 (1).txt
exception we are getting java.lang.reflect.InaccessibleObjectException.

@vladimir-bukhtoyarov
Copy link
Contributor

image

@vladimir-bukhtoyarov
Copy link
Contributor

vladimir-bukhtoyarov commented Apr 8, 2024

@shivsrivastava

Did you read logs that you attached? It is few fragments from this log:

...
2024-02-28 06:10:04,921 [   INFO   ] oos_automation.build.com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0 | log_utils.py          | 122    ::  {'package': 'com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0', 'language': 'java', 'framework': 'maven', 'build_cmd': 'mvn clean install -DskipTests', 'os_name': 'shivsite Linux Server', 'os_version': '8.9', 'compiler/interpreter': 'javac', 'python_version': '3.9.6', 'java_version': '17.0.8.1', 'maven_version': '3.9.4', 'gradle_version': '8.2.1', 'ant_version': '1.10.14', 'node_version': '20.10.0', 'http_proxy': None, 'https_proxy': None, 'java_home': '/opt/jdk-17.0.8.1+1', 'path': '/opt/jdk-17.0.8.1+1/bin:/opt/gradle-8.2.1/bin:/opt/apache-maven-3.9.4/bin:/opt/apache-ant-1.10.14/bin:/opt/sbt/bin:/opt/jdk-17.0.8.1+1/bin:/opt/apache-ant-1.10.14/bin:/opt/apache-maven-3.9.4/bin:/opt/gradle-8.2.1/bin:/opt/sbt/bin:/opt/python3.9/bin:/opt/node-v20.10.0-linux-x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'}
...
...
2024-02-28 06:10:04,924 [   INFO   ] oos_automation.build.com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0 | log_utils.py          | 148    ::  Environment
+----------------------+------------------------------------------------------------------------------------------------------+
| ENV                  | VALUE                                                                                                |
|----------------------+------------------------------------------------------------------------------------------------------|
| PACKAGE              | com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0                                             |
| LANGUAGE             | java                                                                                                 |
| FRAMEWORK            | maven                                                                                                |
| BUILD_CMD            | mvn clean install -DskipTests                                                                        |
| OS_NAME              | shivsite Linux Server                                                                                  |
| OS_VERSION           | 8.9                                                                                                  |
| COMPILER/INTERPRETER | javac                                                                                                |
| PYTHON_VERSION       | 3.9.6                                                                                                |
| JAVA_VERSION         | 17.0.8.1                                                                                             |
| MAVEN_VERSION        | 3.9.4                                                                                                |
| GRADLE_VERSION       | 8.2.1                                                                                                |
| ANT_VERSION          | 1.10.14                                                                                              |
| NODE_VERSION         | 20.10.0                                                                                              |
| HTTP_PROXY           | None                                                                                                 |
| HTTPS_PROXY          | None                                                                                                 |
| JAVA_HOME            | /opt/jdk-17.0.8.1+1                                                                                  |
| PATH                 | /opt/jdk-17.0.8.1+1/bin:/opt/gradle-8.2.1/bin:/opt/apache-maven-3.9.4/bin:/opt/apache-               |
|                      | ant-1.10.14/bin:/opt/sbt/bin:/opt/jdk-17.0.8.1+1/bin:/opt/apache-ant-1.10.14/bin:/opt/apache-maven-3 |
|                      | .9.4/bin:/opt/gradle-8.2.1/bin:/opt/sbt/bin:/opt/python3.9/bin:/opt/node-v20.10.0-linux-x64/bin:/usr |
|                      | /local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin                                             |
+----------------------+------------------------------------------------------------------------------------------------------+
...

YOU ARE RUNNING THE BUILD ON JAVA 17, WHILE BUILD IS ADDRESSED FOR JAVA 8. I NOTICED YOU ABOUT THIS TWO WEEKS AGO.

@shivsrivastava
Copy link
Author

@shivsrivastava

Did you read logs that you attached? It is few fragments from this log:

...
2024-02-28 06:10:04,921 [   INFO   ] oos_automation.build.com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0 | log_utils.py          | 122    ::  {'package': 'com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0', 'language': 'java', 'framework': 'maven', 'build_cmd': 'mvn clean install -DskipTests', 'os_name': 'shivsite Linux Server', 'os_version': '8.9', 'compiler/interpreter': 'javac', 'python_version': '3.9.6', 'java_version': '17.0.8.1', 'maven_version': '3.9.4', 'gradle_version': '8.2.1', 'ant_version': '1.10.14', 'node_version': '20.10.0', 'http_proxy': None, 'https_proxy': None, 'java_home': '/opt/jdk-17.0.8.1+1', 'path': '/opt/jdk-17.0.8.1+1/bin:/opt/gradle-8.2.1/bin:/opt/apache-maven-3.9.4/bin:/opt/apache-ant-1.10.14/bin:/opt/sbt/bin:/opt/jdk-17.0.8.1+1/bin:/opt/apache-ant-1.10.14/bin:/opt/apache-maven-3.9.4/bin:/opt/gradle-8.2.1/bin:/opt/sbt/bin:/opt/python3.9/bin:/opt/node-v20.10.0-linux-x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'}
...
...
2024-02-28 06:10:04,924 [   INFO   ] oos_automation.build.com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0 | log_utils.py          | 148    ::  Environment
+----------------------+------------------------------------------------------------------------------------------------------+
| ENV                  | VALUE                                                                                                |
|----------------------+------------------------------------------------------------------------------------------------------|
| PACKAGE              | com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0                                             |
| LANGUAGE             | java                                                                                                 |
| FRAMEWORK            | maven                                                                                                |
| BUILD_CMD            | mvn clean install -DskipTests                                                                        |
| OS_NAME              | shivsite Linux Server                                                                                  |
| OS_VERSION           | 8.9                                                                                                  |
| COMPILER/INTERPRETER | javac                                                                                                |
| PYTHON_VERSION       | 3.9.6                                                                                                |
| JAVA_VERSION         | 17.0.8.1                                                                                             |
| MAVEN_VERSION        | 3.9.4                                                                                                |
| GRADLE_VERSION       | 8.2.1                                                                                                |
| ANT_VERSION          | 1.10.14                                                                                              |
| NODE_VERSION         | 20.10.0                                                                                              |
| HTTP_PROXY           | None                                                                                                 |
| HTTPS_PROXY          | None                                                                                                 |
| JAVA_HOME            | /opt/jdk-17.0.8.1+1                                                                                  |
| PATH                 | /opt/jdk-17.0.8.1+1/bin:/opt/gradle-8.2.1/bin:/opt/apache-maven-3.9.4/bin:/opt/apache-               |
|                      | ant-1.10.14/bin:/opt/sbt/bin:/opt/jdk-17.0.8.1+1/bin:/opt/apache-ant-1.10.14/bin:/opt/apache-maven-3 |
|                      | .9.4/bin:/opt/gradle-8.2.1/bin:/opt/sbt/bin:/opt/python3.9/bin:/opt/node-v20.10.0-linux-x64/bin:/usr |
|                      | /local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin                                             |
+----------------------+------------------------------------------------------------------------------------------------------+
...

YOU ARE RUNNING THE BUILD ON JAVA 17, WHILE BUILD IS ADDRESSED FOR JAVA 8. I NOTICED YOU ABOUT THIS TWO WEEKS AGO.

Yes it is correct , but whenever I am trying with all jdk 8,11, 17 . In this table I am getting JDK 17 only because that one last JDK version we used. So don't rely on this table please.

@vladimir-bukhtoyarov
Copy link
Contributor

vladimir-bukhtoyarov commented Apr 10, 2024

Yes it is correct , but whenever I am trying with all jdk 8,11, 17 . In this table I am getting JDK 17 only because that one last JDK version we used. So don't rely on this table please.

@shivsrivastava And where is log for Java 8???

@shivsrivastava
Copy link
Author

Yes it is correct , but whenever I am trying with all jdk 8,11, 17 . In this table I am getting JDK 17 only because that one last JDK version we used. So don't rely on this table please.

@shivsrivastava And where is log for Java 8???

This is combined log for all jdk 8,11,17. It includes all.

@shivsrivastava
Copy link
Author

Please update on it.

@vladimir-bukhtoyarov
Copy link
Contributor

Yes it is correct , but whenever I am trying with all jdk 8,11, 17 . In this table I am getting JDK 17 only because that one last JDK version we used. So don't rely on this table please.

@shivsrivastava And where is log for Java 8???

This is combined log for all jdk 8,11,17. It includes all.

Do not lie to me. There os only one Reactor Summary for bucket4j 7.6.0 record in the log. It means that test was ran only once, and the log explicitly shows that, there are no per JVM build in the log.

@vladimir-bukhtoyarov
Copy link
Contributor

Anyone who else bring logs to this thread for Java higher than 8 will be banned forever.

@devidandupati
Copy link

bucket4j-hazelcast.txt

can you check this logs using jdk-8 ut status failed

@vladimir-bukhtoyarov
Copy link
Contributor

bucket4j-hazelcast.txt

can you check this logs using jdk-8 ut status failed

Check what? Where is log of mvn test command?

I see just this

 | JOB ID     | PACKAGE NAME                                             | LANGUAGE   | PACKAGE TYPE   | FORCE BUILD   | DEPENDENCY BUILD   | BUILD STATUS   | BUILD TIME   | BUILD COMMAND     | JAVA VERSION   | UNIT TEST COMMAND   | UNIT TEST STATUS   | TEST TIME   | BUILD VERIFICATION   |
|:-----------|:---------------------------------------------------------|:-----------|:---------------|:--------------|:-------------------|:---------------|:-------------|:------------------|:---------------|:--------------------|:-------------------|:------------|:---------------------|
| 6633613816 | com.github.vladimir-bukhtoyarov:bucket4j-hazelcast:7.6.0 | java       | main           | True          | True               | Success        | 12.54        | mvn clean install | 1.8.0_382      | mvn test            | FAILURE            | 9.32        | atifactUploaded      |

There is no explanation why it failed, I do not see any logline related to test execution.

Did you check this log prior attach? Do you think that my time costs nothing? As I can see, you think so, that is why I ban you permanently.

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

No branches or pull requests

5 participants