-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
ZOOKEEPER-4726: Upgrade snappy-java version to v1.1.10.3 #2038
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
37fdbe3
to
aed5165
Compare
Hi @eolivelli , @anmolnar, |
aed5165
to
a2b84dd
Compare
Hi @eolivelli , @anmolnar, Could you please take a look? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In looking at the ClientSSLTest, it looks like there's a bunch of problems with it. It seems to have a mix of JUnit4 and JUnit5 code in it.
It also seems to still be using hamcrest matchers with the assertThrows from JUnit4, which are not needed. In fact, there shouldn't be any hamcrest or JUnit4 stuff in any JUnit5 tests. This test is also doing some weird things with intercepting a thrown AssertionError, which really shouldn't be done... those should be handled by the JUnit framework instead. A regular exception should be thrown from the test method, or the assertions should be checked right away, rather than rethrown and checked outside.
Overall, this test class is very weirdly written and could use some improvements. But the portion that pertains to this PR is that it should make use of Assumptions to ignore (with a message) when running on s390x.
Jenkinsfile-s390x
Outdated
@@ -48,7 +48,7 @@ pipeline { | |||
stage('BuildAndTest') { | |||
steps { | |||
sh "git clean -fxd" | |||
sh "mvn verify spotbugs:check checkstyle:check -Pfull-build -Dsurefire-forkcount=4" | |||
sh "mvn verify spotbugs:check checkstyle:check -Pfull-build -Dsurefire-forkcount=4 -Dtest=\!ClientSSLTest -DfailIfNoTests=false" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this a bit more, I think you actually shouldn't skip the test here. Instead, do it in JUnit. In the ClientSSLTest, you can add:
Assumptions.assumeFalse(System.getProperty("os.arch").contains("s390x"), "Test cannot run for s390x because ...").
If you add something like that to the top of a test case, JUnit will not only happily skip the test, but it will also helpfully print out an explanation of why the test was skipped. Keeping the exclusion close to the test case itself is better than writing the exclusion into the Jenkinsfile.
Also, it's not even clear that this is a good pattern to use... as it will try to execute any utility classes as test classes, in addition to the default pattern of *Test,Test*
.
I think this should be changed to use the JUnit Assumption instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ctubbsii for the detailed review. Yes, I agree that skipping the test case in ClientSSLTest.java would be better than skipping it in Jenkinsfile. I will test and push the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ctubbsii, could you please take a look at the latest changes?
8efd19f
to
14a96af
Compare
@@ -147,6 +148,8 @@ public void testClientServerSSLWithCnxnClassName() throws Exception { | |||
@ParameterizedTest(name = "sslProvider={0}, fipsEnabled={1}, hostnameVerification={2}") | |||
@MethodSource("positiveTestData") | |||
public void testClientServerSSL_positive(SslProvider sslProvider, String fipsEnabled, String hostnameVerification) throws Exception { | |||
//Skipping this test for s390x arch as netty-tc-native is not supported | |||
assumeFalse(System.getProperty("os.arch").contains("s390x"), " Skipping for s390x arch as netty-tcnative is not yet supported."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is not related to this patch
can you move it to another patch please ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @eolivelli, I will create another PR to handle this change. Should I create a separate JIRA issue as well? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is required for each PRs, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @eolivelli, I have raised a separate PR to address the above file changes. #2057. Could you please have a look? Thank you.
14a96af
to
694e7d7
Compare
Hi @eolivelli , @ctubbsii Could you please take a look . Thank you. |
Hi @ctubbsii, could this PR be merged? Thanks. |
I'm not a committer on this project so a committer will have to merge it when they approve it. You could try to get committers to review it by sending an email to the developer mailing list. Also, I think there might be an even newer version of snappy now. So you could update this pull request with the latest version while you're waiting for a committer to approve and merge it |
The most recent version of snappy-java is 1.1.10.5 . I have created https://issues.apache.org/jira/browse/ZOOKEEPER-4751 / #2072 for that. |
This PR is now obsolete since #2072 has been merged to master. |
Thanks. Closing this. |
This PR fixes the s390x builds on Apache Zookeeper Jenkins CI.
changes done are as follows:
Could any of the developers please review these changes? Thanks