-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable server port for the tests #2513
base: master
Are you sure you want to change the base?
Configurable server port for the tests #2513
Conversation
I think instead we should use the constant defined in vertx-core : HttpTestBase#DEFAULT_HTTP_PORT and make the vertx-core constant overridable with a system property |
@vietj I don't quite understand. Can you elaborate further? |
@vietj let me give you some context. @percyashu is a former GSoC candidate, who is willing to contribute to Vert.x Web. We have talked off-list and he picked #465 which is marked wit the help wanted label. As discussed with @pmlopes in the ticket, the idea is to use random ports for tests but, for debugging purposes, rely on a sysprop to determine if a fix port should be used instead. All in all, this is comparable to the behavior of sql client tests. The motivation is to reduce the number of intermittent failures, by removing those due to servers being already bound to port |
@percyashu in vertx-core tests we do have a constant DEFAULT_HTTP_PORT = 8080 (https://github.com/eclipse-vertx/vert.x/blob/d2fcda6283f327f505a79ed187afe7752ec75187/src/test/java/io/vertx/core/http/HttpTestBase.java#L37) This constant could be loaded from a system property (e.g. |
Ok @vietj, |
I think you can just reuse the constant when there is no extension, e.g
HttpTestBase.SERVER_PORT
…On Mon, Nov 27, 2023 at 12:19 PM Percy Enoabane ***@***.***> wrote:
Ok @vietj <https://github.com/vietj>,
From my understanding this will involve first making the change to
HttpTestBase, then extending it in the baseTest classes like WebTestBase or
SockJSTestBase instead of directly extending VertxTestBase right?
—
Reply to this email directly, view it on GitHub
<#2513 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABXDCRJPKHION7VGNPKGMLYGRZNHAVCNFSM6AAAAAA7PYL6L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRXGYZTQMBWGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
thanks for the contribution @percyashu |
@vietj and @tsegismont the next steps will be to use HttpTestBase.DEFAULT_HTTP_PORT in this PR right? |
I think yes but instead vertx-web should have its own same constants
that are copied from those, in case we want to refactor those in
vertx-core (e.g move them to a constant class).
…On Wed, Dec 20, 2023 at 6:11 PM Percy Enoabane ***@***.***> wrote:
@vietj and @tsegismont the next steps will be to use HttpTestBase.DEFAULT_HTTP_PORT in this PR right?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Motivation: #465
Run test with port if it is specified e.g
mvn test -Dport=8888
.Conformance:
Your commits should be signed and you should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md
Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines