Skip to content

Commit a33196e

Browse files
committed
chore: wip
1 parent 5ec059d commit a33196e

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

packages/launchpad/src/services/manager.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,10 @@ async function executePostStartCommands(service: ServiceInstance): Promise<void>
708708

709709
// Wait for the service to be fully ready, especially for databases
710710
if (definition.name === 'postgres' || definition.name === 'mysql') {
711-
// For databases, wait longer and check if they're actually ready
712-
await new Promise(resolve => setTimeout(resolve, 5000))
711+
// For databases, wait longer in CI environments and check if they're actually ready
712+
const isCI = process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true'
713+
const waitTime = isCI ? 10000 : 5000 // 10s in CI, 5s locally
714+
await new Promise(resolve => setTimeout(resolve, waitTime))
713715

714716
// Try to verify the service is responding before running post-start commands
715717
if (definition.healthCheck) {

packages/launchpad/test/environment-isolation.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ describe('Environment Isolation', () => {
6565
'/usr/local/bin',
6666
].filter(Boolean)
6767

68-
// Add any missing bun paths to PATH
69-
let enhancedPath = currentPath
70-
for (const bunPath of bunPaths) {
71-
if (!enhancedPath.includes(bunPath)) {
72-
enhancedPath = `${bunPath}:${enhancedPath}`
68+
// Add any missing bun paths to PATH
69+
let enhancedPath = currentPath
70+
for (const bunPath of bunPaths) {
71+
if (bunPath && !enhancedPath.includes(bunPath)) {
72+
enhancedPath = `${bunPath}:${enhancedPath}`
73+
}
7374
}
74-
}
7575

7676
return {
7777
...process.env,

packages/launchpad/test/services.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ describe('Service Management', () => {
452452
const stopResults = await Promise.all(stopPromises)
453453

454454
stopResults.forEach(result => expect(result).toBe(true))
455-
}, 10000) // Set explicit 10-second timeout for this test
455+
}, 30000) // Set explicit 30-second timeout for GitHub Actions
456456

457457
it('should prevent starting already running service', async () => {
458458
if (!isPlatformSupported()) {
@@ -570,7 +570,7 @@ describe('Service Management', () => {
570570
expect((error as Error).message).toContain('not supported')
571571
}
572572
}
573-
}, 10000) // Set explicit 10-second timeout for this test
573+
}, 30000) // Set explicit 30-second timeout for GitHub Actions
574574

575575
it('should handle service definition not found', async () => {
576576
// The service manager catches errors and returns false instead of throwing

0 commit comments

Comments
 (0)