Skip to content

Commit 3fdad0d

Browse files
committed
fix test setup
1 parent 236c91e commit 3fdad0d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

epicshop/mcp-dev/dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ async function waitForServerReady({ process: childProcess, textMatch, name }) {
114114
return new Promise((resolve, reject) => {
115115
const timeout = setTimeout(() => {
116116
process.kill()
117-
reject(new Error(`${name} failed to start within 20 seconds`))
118-
}, 20_000)
117+
reject(new Error(`${name} failed to start within 10 seconds`))
118+
}, 10_000)
119119

120120
function searchForMatch(data) {
121121
const str = data.toString()

exercises/02.start/01.solution/test/globalSetup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export default async function setup(project: TestProject) {
3737
return new Promise<void>((resolve, reject) => {
3838
const timeout = setTimeout(() => {
3939
childProcess?.kill()
40-
reject(new Error(`${name} failed to start within 20 seconds`))
41-
}, 20_000)
40+
reject(new Error(`${name} failed to start within 10 seconds`))
41+
}, 10_000)
4242

4343
function searchForMatch(data: Buffer) {
4444
const str = data.toString()
@@ -102,7 +102,7 @@ export default async function setup(project: TestProject) {
102102
// Wait for MCP server to be ready
103103
await waitForServerReady({
104104
process: mcpServerProcess,
105-
textMatch: `:${mcpServerPort.toString()}`,
105+
textMatch: mcpServerPort.toString(),
106106
name: '[MCP-SERVER]',
107107
outputBuffer: mcpServerOutput,
108108
})

exercises/99.finished/99.solution/test/globalSetup.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export default async function setup(project: TestProject) {
3939
return new Promise<void>((resolve, reject) => {
4040
const timeout = setTimeout(() => {
4141
childProcess?.kill()
42-
reject(new Error(`${name} failed to start within 20 seconds`))
43-
}, 20_000)
42+
reject(new Error(`${name} failed to start within 10 seconds`))
43+
}, 10_000)
4444

4545
function searchForMatch(data: Buffer) {
4646
const str = data.toString()
@@ -145,14 +145,14 @@ export default async function setup(project: TestProject) {
145145
appServerProcess
146146
? waitForServerReady({
147147
process: appServerProcess,
148-
textMatch: ':7788',
148+
textMatch: '7788',
149149
name: '[APP-SERVER]',
150150
outputBuffer: appServerOutput,
151151
})
152152
: Promise.resolve(),
153153
waitForServerReady({
154154
process: mcpServerProcess,
155-
textMatch: `:${mcpServerPort.toString()}`,
155+
textMatch: mcpServerPort.toString(),
156156
name: '[MCP-SERVER]',
157157
outputBuffer: mcpServerOutput,
158158
}),

0 commit comments

Comments
 (0)