You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "clolov (via GitHub)" <gi...@apache.org> on 2023/02/08 11:39:20 UTC

[GitHub] [kafka] clolov opened a new pull request, #13219: MINOR: Simplify JUnit assertions; remove accidental unnecessary code

clolov opened a new pull request, #13219:
URL: https://github.com/apache/kafka/pull/13219

   I ran IntelliJ IDEA's Code Inspection and corrected occurrences of the following:
   * https://www.jetbrains.com/help/idea/list-of-java-inspections.html#junit (assertEquals() called on array; simplifiable JUnit assertion)
   * https://www.jetbrains.com/help/idea/list-of-java-inspections.html#inheritance-issues (method is identical to its super method)
   * https://www.jetbrains.com/help/idea/list-of-java-inspections.html#imports (unused import)
   


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] clolov commented on pull request #13219: MINOR: Simplify JUnit assertions; remove accidental unnecessary code

Posted by "clolov (via GitHub)" <gi...@apache.org>.
clolov commented on PR #13219:
URL: https://github.com/apache/kafka/pull/13219#issuecomment-1422611706

   ```
   Execution failed for task ':connect:runtime:spotbugsMain'.
   Execution failed for task ':streams:spotbugsMain'.
   ```


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] clolov commented on pull request #13219: MINOR: Simplify JUnit assertions; remove accidental unnecessary code

Posted by "clolov (via GitHub)" <gi...@apache.org>.
clolov commented on PR #13219:
URL: https://github.com/apache/kafka/pull/13219#issuecomment-1431608450

   @divijvaidya, as suggested I have left only test changes in this pull request. Furthermore, I believe I have fixed all `assertEquals` which had arguments the wrong way around 😊


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] clolov commented on pull request #13219: MINOR: Simplify JUnit assertions; remove accidental unnecessary code

Posted by "clolov (via GitHub)" <gi...@apache.org>.
clolov commented on PR #13219:
URL: https://github.com/apache/kafka/pull/13219#issuecomment-1422459911

   @divijvaidya and @mimaison for visibility!


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] divijvaidya commented on a diff in pull request #13219: MINOR: Simplify JUnit assertions; remove accidental unnecessary code

Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on code in PR #13219:
URL: https://github.com/apache/kafka/pull/13219#discussion_r1102521315


##########
clients/src/test/java/org/apache/kafka/common/utils/ImplicitLinkedHashCollectionTest.java:
##########
@@ -142,8 +143,8 @@ static void expectTraversal(Iterator<TestElement> iterator, Integer... sequence)
             assertEquals(sequence[i].intValue(), element.key, "Iterator value number " + (i + 1) + " was incorrect.");
             i = i + 1;
         }
-        assertTrue(i == sequence.length, "Iterator yieled " + (i + 1) + " elements, but " +
-            sequence.length + " were expected.");
+        assertEquals(i, sequence.length, "Iterator yieled " + (i + 1) + " elements, but " +

Review Comment:
   in assertEquals, the first parameter is the one that is expected, hence, in this case it would be `assertEquals(sequence.length, i, ....)`
   
   (same comments for other places)



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] mimaison merged pull request #13219: MINOR: Simplify JUnit assertions in tests; remove accidental unnecessary code in tests

Posted by "mimaison (via GitHub)" <gi...@apache.org>.
mimaison merged PR #13219:
URL: https://github.com/apache/kafka/pull/13219


-- 
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: jira-unsubscribe@kafka.apache.org

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