File tree 4 files changed +9
-5
lines changed
4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
// Default port from the server
2
2
export const defaultPort = 3000 ;
3
3
export const prometheusPort = 2114 ;
4
- export const pprofPort = 6061 ;
4
+
5
+ // Use alternate ports in case we're running in a Coder Workspace.
6
+ export const agentPProfPort = 6061 ;
7
+ export const coderdPProfPort = 6062 ;
5
8
6
9
// Credentials for the first user
7
10
export const username = "admin" ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import {
15
15
Resource ,
16
16
RichParameter ,
17
17
} from "./provisionerGenerated" ;
18
- import { prometheusPort , pprofPort } from "./constants" ;
18
+ import { prometheusPort , agentPProfPort } from "./constants" ;
19
19
import { port } from "./playwright.config" ;
20
20
import * as ssh from "ssh2" ;
21
21
import { Duplex } from "stream" ;
@@ -306,7 +306,7 @@ export const startAgentWithCommand = async (
306
306
...process . env ,
307
307
CODER_AGENT_URL : "http://localhost:" + port ,
308
308
CODER_AGENT_TOKEN : token ,
309
- CODER_AGENT_PPROF_ADDRESS : "127.0.0.1:" + pprofPort ,
309
+ CODER_AGENT_PPROF_ADDRESS : "127.0.0.1:" + agentPProfPort ,
310
310
CODER_AGENT_PROMETHEUS_ADDRESS : "127.0.0.1:" + prometheusPort ,
311
311
} ,
312
312
} ) ;
Original file line number Diff line number Diff line change 1
1
import { defineConfig } from "@playwright/test" ;
2
2
import path from "path" ;
3
- import { defaultPort , gitAuth } from "./constants" ;
3
+ import { defaultPort , coderdPProfPort , gitAuth } from "./constants" ;
4
4
5
5
export const port = process . env . CODER_E2E_PORT
6
6
? Number ( process . env . CODER_E2E_PORT )
@@ -103,6 +103,7 @@ export default defineConfig({
103
103
gitAuth . webPort ,
104
104
gitAuth . validatePath ,
105
105
) ,
106
+ CODER_PPROF_ADDRESS : "127.0.0.1:" + coderdPProfPort ,
106
107
} ,
107
108
reuseExistingServer : false ,
108
109
} ,
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ const filteredServerLogLines = (chunk: string): string[] =>
119
119
120
120
const exportDebugPprof = async ( outputFile : string ) => {
121
121
const response = await axios . get (
122
- "http://127.0.0.1:6060 /debug/pprof/goroutine?debug=1" ,
122
+ "http://127.0.0.1:6062 /debug/pprof/goroutine?debug=1" ,
123
123
) ;
124
124
if ( response . status !== 200 ) {
125
125
throw new Error ( `Error: Received status code ${ response . status } ` ) ;
You can’t perform that action at this time.
0 commit comments