Re: [I] Clarify passive port range behavior [mina-ftpserver]

2024-02-23 Thread via GitHub


flozano commented on issue #35:
URL: https://github.com/apache/mina-ftpserver/issues/35#issuecomment-1960902511

   This is the second time in a row that I report false bugs to this project. 
Apologies.


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



Re: [I] Clarify passive port range behavior [mina-ftpserver]

2024-02-23 Thread via GitHub


flozano closed issue #35: Clarify passive port range behavior
URL: https://github.com/apache/mina-ftpserver/issues/35


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[I] Clarify passive port range behavior [mina-ftpserver]

2024-02-23 Thread via GitHub


flozano opened a new issue, #35:
URL: https://github.com/apache/mina-ftpserver/issues/35

   I'm doing some tests to understand the behaviour of PassivePort:
   
   ```java
   public class PassivePortsTest {
   
   
@Test
public void testSimple() {
assertPassivePorts("8182-8190", IntStream.range(8182, 8190));
}
   
private void assertPassivePorts(String rangeString, IntStream range) {
var passivePorts = new PassivePorts(rangeString, false);
try {
   
List freeList = (List) 
FieldUtils.readField(passivePorts, "freeList", true);
assertEquals(new TreeSet<>(freeList), new 
TreeSet<>(range.boxed().collect(Collectors.toSet(;
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
   }
   ```
   but it seems it doesn't work as I expected, the latest port in the range is 
not available:
   
   ```
   org.opentest4j.AssertionFailedError: 
   Expected :[8182, 8183, 8184, 8185, 8186, 8187, 8188, 8189, 8190]
   Actual   :[8182, 8183, 8184, 8185, 8186, 8187, 8188, 8189]
   ```
   
   is this expected? From the documentation I would understand that 8190 would 
be included in the range:
   https://mina.apache.org/ftpserver-project/configuration_passive_ports.html:
   https://github.com/apache/mina-ftpserver/assets/1159291/ef1fef81-6c43-4a60-842f-4ea1a3413cdf;>
   
   
   ```
   ```


-- 
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: dev-unsubscr...@mina.apache.org.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org