tpalfy commented on a change in pull request #3647: NIFI-6530 - HTTP SiteToSite 
server returns 201 in case no data is ava…
URL: https://github.com/apache/nifi/pull/3647#discussion_r314727977
 
 

 ##########
 File path: 
nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/http/TestHttpClient.java
 ##########
 @@ -1224,6 +1249,24 @@ public void testReceiveUnknownPort() throws Exception {
         }
     }
 
+    @Test
+    public void testReceiveEmptyPort() throws Exception {
 
 Review comment:
   Not entirely sure how this works but I ran all tests in this class and 3 
failed (out of 33).
   The CI jobs are inconsistent, I see some run only 5 but one fails with the 
same 3 as mine does.
   
   The culprit seems to be this new test and the main cause is that it runs for 
almost half a minute and after a while it fails due to a 
`java.net.ConnectException` which forces the `HttpClient` to return with a null 
transaction. (The other 2 tests succeed on their own so I guess this is a 
time-related issue.)
   
   This problem doesn't occur if the the peer is penalised. Probably has 
something to do with the fact the `PeerSelector.getNextPeerStatus` in the 
`HttpClient` just keeps returning peers if they are not penalised.
   
   Maybe both
   ```java
   apiClient.close();
   peerSelector.penalize(peer, penaltyMillis);
   ```
   would be in order when `NoContentException` comes in `HttpClient`.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to