quasar-testing icon indicating copy to clipboard operation
quasar-testing copied to clipboard

Alternate port if port is already in use

Open sschneider-ihre-pvs opened this issue 3 years ago • 2 comments

When using starttest with http-get I think the devserver should not automatically pick a free port since the http-get will never succeed and you will wait for the timeout. Or, if possible the http-get should then use the same port that the devserver chose.

sschneider-ihre-pvs avatar Dec 13 '21 14:12 sschneider-ihre-pvs

Do you have any suggestion on how to fix this problem? The quickfix I see is to define a custom port (eg. 9999) when starting quasar dev and ping that one instead I'm not sure it's easily doable to autodetect the port used from quasar dev and ping that one instead (and you may have more than one Quasar instance running) We're open to PRs

IlCallo avatar Dec 31 '21 11:12 IlCallo

I guess @bahmutov or someone from contributors of start-server-and-test might have to handle that like in the helpers/net thing quasar uses to pick a new port. Alternatively, you could run the net helper and then spawn a process for start-server with the final port.

sschneider-ihre-pvs avatar Jan 03 '22 12:01 sschneider-ihre-pvs

In the upcoming new version we'll force the devServer to use 8080 port to unify the usage among different build targets

IlCallo avatar Sep 13 '23 17:09 IlCallo

Ouch, that will pretty much ruin our cors settings because we use 8088

sschneider-ihre-pvs avatar Sep 14 '23 07:09 sschneider-ihre-pvs

We could add a prompt and ask the user which port to enforce 🤔 Would that suffice?

IlCallo avatar Sep 14 '23 11:09 IlCallo

I guess so

sschneider-ihre-pvs avatar Sep 14 '23 11:09 sschneider-ihre-pvs

Implemented in https://github.com/quasarframework/quasar-testing/commit/a33265d1ee753c66b0dbb2f692f853976a0d2484, will be available into next v5.2 release

IlCallo avatar Oct 20 '23 13:10 IlCallo