You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/12/09 15:51:35 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #9520: MINOR: replace test "expected" parameter by assertThrows

chia7712 commented on a change in pull request #9520:
URL: https://github.com/apache/kafka/pull/9520#discussion_r539422760



##########
File path: clients/src/test/java/org/apache/kafka/clients/NetworkClientTest.java
##########
@@ -117,13 +118,12 @@ public void setup() {
         selector.reset();
     }
 
-    @Test(expected = IllegalStateException.class)
+    @Test
     public void testSendToUnreadyNode() {
         MetadataRequest.Builder builder = new MetadataRequest.Builder(Collections.singletonList("test"), true);
         long now = time.milliseconds();
         ClientRequest request = client.newClientRequest("5", builder, now, false);
-        client.send(request, now);
-        client.poll(1, time.milliseconds());

Review comment:
       ```client.send(request, now);``` throws exception so ```client.poll(1, time.milliseconds());``` was never reached.




----------------------------------------------------------------
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