You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "celinayk (via GitHub)" <gi...@apache.org> on 2025/08/16 08:43:14 UTC
[PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
celinayk opened a new pull request, #5029:
URL: https://github.com/apache/zeppelin/pull/5029
### What is this PR for?
This PR adds a comprehensive suite of unit tests for the LivyVersion class. The LivyVersion class is critical for ensuring Zeppelin's compatibility with various versions of the Livy server.
### What type of PR is it?
Test
### Todos
* [x] Add LivyVersionTest.java with comprehensive test cases.
* [x] Ensure all tests pass with the existing LivyVersion implementation.
### What is the Jira issue?
[ZEPPELIN-6281](https://issues.apache.org/jira/browse/ZEPPELIN-6281)
### How should this be tested?
### Screenshots (if appropriate)
### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on code in PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#discussion_r2285200875
##########
livy/src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:
##########
@@ -0,0 +1,59 @@
+package org.apache.zeppelin.livy;
Review Comment:
Could you please add the Apache license header?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "celinayk (via GitHub)" <gi...@apache.org>.
celinayk commented on code in PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#discussion_r2285240083
##########
livy/src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:
##########
@@ -0,0 +1,59 @@
+package org.apache.zeppelin.livy;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
Review Comment:
Thanks for pointing that out!! I'll update the code to remove the wildcard and explicitly import only the Assertions methods that are used in the test.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "celinayk (via GitHub)" <gi...@apache.org>.
celinayk commented on code in PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#discussion_r2289930485
##########
livy/src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:
##########
@@ -0,0 +1,59 @@
+package org.apache.zeppelin.livy;
Review Comment:
Ok thank you!
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#issuecomment-3204380745
There are several checkstyle errors.
```
[INFO] --- checkstyle:3.4.0:check (checkstyle-fail-build) @ zeppelin-livy ---
[INFO] There are 36 errors reported by Checkstyle 9.3 with zeppelin/checkstyle.xml ruleset.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[27,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[29,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[30,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[31,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[32,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[34,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[36,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[37,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[38,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[39,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[41,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[43,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[44,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[45,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[46,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[47,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[48,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[49,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[51,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[53,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[54,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[56,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[57,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[58,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[60,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[62,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[63,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[64,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[66,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[68,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[69,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[70,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[72,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[74,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[75,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[76,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
```
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae merged PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "celinayk (via GitHub)" <gi...@apache.org>.
celinayk commented on PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#issuecomment-3205517578
> There are several checkstyle errors.
>
> ```
> [INFO] --- checkstyle:3.4.0:check (checkstyle-fail-build) @ zeppelin-livy ---
> [INFO] There are 36 errors reported by Checkstyle 9.3 with zeppelin/checkstyle.xml ruleset.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[27,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[29,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[30,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[31,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[32,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[34,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[36,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[37,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[38,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[39,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[41,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[43,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[44,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[45,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[46,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[47,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[48,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[49,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[51,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[53,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[54,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[56,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[57,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[58,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[60,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[62,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[63,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[64,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[66,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[68,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[69,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[70,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[72,5] (indentation) Indentation: 'method def modifier' has incorrect indentation level 4, expected level should be 2.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[74,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[75,9] (indentation) Indentation: 'method def' child has incorrect indentation level 8, expected level should be 4.
> Error: src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:[76,5] (indentation) Indentation: 'method def rcurly' has incorrect indentation level 4, expected level should be 2.
> ```
Thank you for your feedback !
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on code in PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#discussion_r2286797536
##########
livy/src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:
##########
@@ -0,0 +1,59 @@
+package org.apache.zeppelin.livy;
Review Comment:
Please separate the license header from the package declaration with a blank line.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on code in PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#discussion_r2285447657
##########
livy/src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zeppelin.livy;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+
+class LivyVersionTest {
+
+ @Test
+ void testVersionParsing() {
+ LivyVersion v = new LivyVersion("1.6.2");
+ assertEquals(10602, v.toNumber());
+ assertEquals("1.6.2", v.toString());
+ }
+
+ @Test
+ void testPreReleaseVersionParsing() {
+ LivyVersion v = new LivyVersion("0.6.0-SNAPSHOT");
+ assertEquals(600, v.toNumber());
+ assertEquals("0.6.0-SNAPSHOT", v.toString());
+ }
+
+ @Test
+ void testComparisonLogic() {
+ LivyVersion v1 = new LivyVersion("0.5.0");
+ LivyVersion v2 = new LivyVersion("0.4.0");
+ assertTrue(v1.newerThan(v2));
+ assertTrue(v2.olderThan(v1));
+ assertFalse(v2.newerThan(v1));
+ assertFalse(v1.olderThan(v2));
+ }
+
+ @Test
+ void testInvalidVersionString() {
+ LivyVersion v1 = new LivyVersion("invalid");
+ assertEquals(99999, v1.toNumber());
+
+ LivyVersion v2 = new LivyVersion(null);
+ assertEquals(99999, v2.toNumber());
+ }
+
+ @Test
+ void isCancelSupported() {
+ assertTrue(new LivyVersion("0.3.0").isCancelSupported());
+ assertFalse(new LivyVersion("0.2.0").isCancelSupported());
+ }
+
+ @Test
+ void isSharedSupported() {
+ assertTrue(new LivyVersion("0.5.0").isSharedSupported());
+ assertFalse(new LivyVersion("0.4.0").isSharedSupported());
+ }
+
+ @Test
+ void isGetProgressSupported() {
+ assertTrue(new LivyVersion("0.4.0").isGetProgressSupported());
+ assertFalse((new LivyVersion("0.3.0")).isGetProgressSupported());
+ }
+}
Review Comment:
Please a new line at the end of the file.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "celinayk (via GitHub)" <gi...@apache.org>.
celinayk commented on code in PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#discussion_r2285217031
##########
livy/src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:
##########
@@ -0,0 +1,59 @@
+package org.apache.zeppelin.livy;
Review Comment:
> Could you please add the Apache license header?
oh, okay thank you !!
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#issuecomment-3214448725
Merged into master and branch-0.12
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on code in PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#discussion_r2285206841
##########
livy/src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:
##########
@@ -0,0 +1,59 @@
+package org.apache.zeppelin.livy;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
Review Comment:
Could you update this to avoid the wildcard import and use explicit imports for the Assertions methods being used?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "celinayk (via GitHub)" <gi...@apache.org>.
celinayk commented on PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#issuecomment-3200760151
> Please make the minor changes I commented on.
Done. Thank you!
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6281] Add Unit Tests for LivyVersion Class [zeppelin]
Posted by "celinayk (via GitHub)" <gi...@apache.org>.
celinayk commented on code in PR #5029:
URL: https://github.com/apache/zeppelin/pull/5029#discussion_r2285487054
##########
livy/src/test/java/org/apache/zeppelin/livy/LivyVersionTest.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zeppelin.livy;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+
+class LivyVersionTest {
+
+ @Test
+ void testVersionParsing() {
+ LivyVersion v = new LivyVersion("1.6.2");
+ assertEquals(10602, v.toNumber());
+ assertEquals("1.6.2", v.toString());
+ }
+
+ @Test
+ void testPreReleaseVersionParsing() {
+ LivyVersion v = new LivyVersion("0.6.0-SNAPSHOT");
+ assertEquals(600, v.toNumber());
+ assertEquals("0.6.0-SNAPSHOT", v.toString());
+ }
+
+ @Test
+ void testComparisonLogic() {
+ LivyVersion v1 = new LivyVersion("0.5.0");
+ LivyVersion v2 = new LivyVersion("0.4.0");
+ assertTrue(v1.newerThan(v2));
+ assertTrue(v2.olderThan(v1));
+ assertFalse(v2.newerThan(v1));
+ assertFalse(v1.olderThan(v2));
+ }
+
+ @Test
+ void testInvalidVersionString() {
+ LivyVersion v1 = new LivyVersion("invalid");
+ assertEquals(99999, v1.toNumber());
+
+ LivyVersion v2 = new LivyVersion(null);
+ assertEquals(99999, v2.toNumber());
+ }
+
+ @Test
+ void isCancelSupported() {
+ assertTrue(new LivyVersion("0.3.0").isCancelSupported());
+ assertFalse(new LivyVersion("0.2.0").isCancelSupported());
+ }
+
+ @Test
+ void isSharedSupported() {
+ assertTrue(new LivyVersion("0.5.0").isSharedSupported());
+ assertFalse(new LivyVersion("0.4.0").isSharedSupported());
+ }
+
+ @Test
+ void isGetProgressSupported() {
+ assertTrue(new LivyVersion("0.4.0").isGetProgressSupported());
+ assertFalse((new LivyVersion("0.3.0")).isGetProgressSupported());
+ }
+}
Review Comment:
> Please a new line at the end of the file.
Got it, I wasn’t aware of that convention. Thanks for letting me know!
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org