Skip to content

Commit f112fbc

Browse files
committed
Change http reverse proxy test to await TCP port test individually
This commit modifies the http reverse proxy test to await TCP port test individually. The change ensures that we don't end up in a race condition to grab TCP ports and the same one is chosen multiple times.
1 parent f09a951 commit f112fbc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: packages/app/src/cli/utilities/app/http-reverse-proxy.test.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,9 @@ function getTestReverseProxy(protocol: 'http' | 'https') {
8181
}>({
8282
// eslint-disable-next-line no-empty-pattern
8383
ports: async ({}, use) => {
84-
const [proxyPort, targetPort1, targetPort2] = await Promise.all([
85-
getAvailableTCPPort(),
86-
getAvailableTCPPort(),
87-
getAvailableTCPPort(),
88-
])
84+
const proxyPort = await getAvailableTCPPort()
85+
const targetPort1 = await getAvailableTCPPort()
86+
const targetPort2 = await getAvailableTCPPort()
8987
await use({proxyPort, targetPort1, targetPort2})
9088
},
9189
servers: async ({ports}, use) => {

0 commit comments

Comments
 (0)