首页 > 解决方案 > Firebase 应用程序在 Google Cloud Build 的测试阶段挂起

问题描述

来自 Reddit 的交叉发布,但总而言之-我正在尝试使用 Firestore 来设置 React 应用程序用于数据存储和 GCB 用于 CI/CD。但是,当我使用 Firestore 推送新代码时,GCB 会在测试阶段挂起。

我做了一些基本的调试——

Step #1: > react-scripts test --watchAll=false --detectOpenHandles
Step #1:
Step #1: PASS src/IdeaTable/IdeaTable.test.tsx
Step #1: PASS src/models/IdeasService.test.ts
Step #1:   â— Console
Step #1:
Step #1:     console.log src/models/IdeasService.test.ts:6
Step #1:       [ { description: 'Set up personal website, mostly for this but also for hosting Calibre',
Step #1:           slug: 'setup-portfolio',
Step #1:           summary: 'Set up portfolio',
Step #1:           id: 'wvQOj2m3zFNpwvdZVAnr' }]
Step #1:
Step #1: PASS src/App.test.tsx
Step #1:
Step #1: Test Suites: 3 passed, 3 total
Step #1: Tests:       5 passed, 5 total
Step #1: Snapshots:   1 passed, 1 total
Step #1: Time:        5.115s
Step #1: Ran all test suites.

正如 Reddit 帖子中所指出的,我目前最好的假设是,这个问题是由于与 Firebase 的连接保持打开并阻止事情完成,但我不知道如何解决这个问题。

标签: google-cloud-firestoregoogle-cloud-build

解决方案


推荐阅读