ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
137 stars 58 forks source link

Use offset ports for test cases of library modules in the same level #6826

Open ayeshLK opened 1 month ago

ayeshLK commented 1 month ago

Description:

$subject

While running FB pipeline for ballerina-lang PRs [1] it was observed that websub module build is failing intermittently due to following issue;

 error: failed to start server connector '0.0.0.0:9091': Address already in use
    at ballerina.http.2.Listener:start(http_service_endpoint.bal:54)
       ballerina.websub.2.Listener:start(sub_listener.bal:158)

One potential cause of this issue could be that the port has not been released even after the previous module build was completed. To address this, we could enhance the test cases for library modules at the same level by implementing the use of offset ports.

[1] - https://github.com/ballerina-platform/ballerina-lang/actions/runs/10242920063/job/28334411407?pr=43196#step:9:3732