You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/12 06:40:36 UTC

[GitHub] [pulsar] eolivelli opened a new pull request #9893: More fixes about running tests on JDK11

eolivelli opened a new pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893


   ### Motivation
   When you are running tests on JDK11 you encounter a lot of issues.
   This patch includes a list of minor fixes that can be grouped.
   
   Master issue #9578 
   
   ### Modifications
   - Upgrade Mockito to latest version
   - Add  "--add-opens java.base/jdk.internal.loader=ALL-UNNAMED" in order to allow PowerMock to work
   - add JAXB into jcloud provider (we already have it on the classpath in production, it is only in order to let tests run)
   - Upgrade HDFS minicluster to 3.3.0
   - Pin netty-codec-http dependency to the same version of netty (inherited from HDFS client)
   - Use the same version of Jetty for hdfs-offload (old version does not work with JDK11)
   
   ### Verifying this change
   
   Tests must still run successfully on JDK8.
   
   Once all tests are known to run on JDK11 we will switch CI tests runner to JDK11, this cannot be done in this PR.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#discussion_r593464555



##########
File path: pom.xml
##########
@@ -209,6 +209,7 @@ flexible messaging model and an intuitive client API.</description>
     <directory-maven-plugin.version>0.3.1</directory-maven-plugin.version>
     <maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version>
     <maven-surefire-plugin.version>3.0.0-M3</maven-surefire-plugin.version>
+    <test.additional.args></test.additional.args>

Review comment:
       I moved this to the top.
   I had added this line here next to surefire version, but actually it makes more sense to have it next to other test related properties.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#issuecomment-797769847


   @merlimat I have addressed your comments PTAL
   thanks for your quick review


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#issuecomment-797505512


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#issuecomment-800842489


   Thanks for you advice. I found the real cause just now, which is not related to this profile. The error may be caused by some Maven plugins, see https://youtrack.jetbrains.com/issue/IDEA-258574
   
   I just fixed it by disabling the `argLine` option.
   
   ![image](https://user-images.githubusercontent.com/18204803/111426731-0e1e9f80-8730-11eb-9f53-4d3d8401f00c.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#issuecomment-800834525


   Hi, I just pull the latest master and when I ran a test with Intellij Idea, it failed to start with following error message
   
   ```
   Unrecognized option: --add-opens
   Error: Could not create the Java Virtual Machine.
   Error: A fatal exception has occurred. Program will exit.
   ```
   
   I think it may be caused by this PR.
   
   
   ```xml
       <profile>
         <id>jdk11-tests</id>
         <activation>
           <jdk>[11,)</jdk>
         </activation>
         <properties>
           <test.additional.args> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED </test.additional.args>
         </properties>
       </profile>
   ```
   
   But even after I removed these lines from `pom.xml`, it still failed. Could you give some advice for JDK8 environment?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli edited a comment on pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
eolivelli edited a comment on pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#issuecomment-800840364


   In IntelliJ check if it automatically enabled this profile. If so then simply unselect it.
   That was my case
   
   @BewareMyPower we can continue on slack


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#discussion_r593342013



##########
File path: pom.xml
##########
@@ -209,6 +209,7 @@ flexible messaging model and an intuitive client API.</description>
     <directory-maven-plugin.version>0.3.1</directory-maven-plugin.version>
     <maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version>
     <maven-surefire-plugin.version>3.0.0-M3</maven-surefire-plugin.version>
+    <test.additional.args></test.additional.args>

Review comment:
       Nit: maybe this variable could be moved to the top of the sections instead of being grouped with the version variables.

##########
File path: pom.xml
##########
@@ -143,8 +143,8 @@ flexible messaging model and an intuitive client API.</description>
     <postgresql-jdbc.version>42.2.12</postgresql-jdbc.version>
     <clickhouse-jdbc.version>0.2.4</clickhouse-jdbc.version>
     <mariadb-jdbc.version>2.6.0</mariadb-jdbc.version>
-    <hdfs-offload-version3>3.2.0</hdfs-offload-version3>
-    <org.eclipse.jetty-hdfs-offload>9.3.24.v20180605</org.eclipse.jetty-hdfs-offload>
+    <hdfs-offload-version3>3.3.0</hdfs-offload-version3>
+    <org.eclipse.jetty-hdfs-offload>${jetty.version}</org.eclipse.jetty-hdfs-offload>

Review comment:
       Could we just remove the special variable and use `${jetty.version}` directly?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#issuecomment-800840364


   In IntelliJ check if it automatically enabled this profile. If so then simply unselect it.
   That was my case


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #9893: More fixes about running tests on JDK11

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #9893:
URL: https://github.com/apache/pulsar/pull/9893#discussion_r593464253



##########
File path: pom.xml
##########
@@ -143,8 +143,8 @@ flexible messaging model and an intuitive client API.</description>
     <postgresql-jdbc.version>42.2.12</postgresql-jdbc.version>
     <clickhouse-jdbc.version>0.2.4</clickhouse-jdbc.version>
     <mariadb-jdbc.version>2.6.0</mariadb-jdbc.version>
-    <hdfs-offload-version3>3.2.0</hdfs-offload-version3>
-    <org.eclipse.jetty-hdfs-offload>9.3.24.v20180605</org.eclipse.jetty-hdfs-offload>
+    <hdfs-offload-version3>3.3.0</hdfs-offload-version3>
+    <org.eclipse.jetty-hdfs-offload>${jetty.version}</org.eclipse.jetty-hdfs-offload>

Review comment:
       okay.
   updated




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org