google-cloud-firestore - Firebase 应用程序在 Google Cloud Build 的测试阶段挂起
问题描述
来自 Reddit 的交叉发布,但总而言之-我正在尝试使用 Firestore 来设置 React 应用程序用于数据存储和 GCB 用于 CI/CD。但是,当我使用 Firestore 推送新代码时,GCB 会在测试阶段挂起。
我做了一些基本的调试——
当我尝试从 Firestore读取时,它挂起,但是在我只写入数据的这个 commit中,它构建得很好。
在我添加的用于检查与 Firestore 交互的测试中,它们都通过了,并且构建日志显示它能够从 Firestore 中正常读取。它只是,你知道,在那之后不会去任何地方。
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 的连接保持打开并阻止事情完成,但我不知道如何解决这个问题。
解决方案
推荐阅读
- java - 使用spring批处理和csv文件格式获取空指针异常向db发送数据
- flutter - 如何在 Flutter vs code 中将 Android Emulator 设置为默认设备?
- python - 我不知道为什么我的 django 注册表单无法创建新用户
- php - 如何在 Mywebservice 中从 json 插入多条记录
- python - 如何使用 Tensorflow 对象检测 API 保存 10-15 个检查点?
- javascript - 如何使用 querySelector() 获取具有多个类的 div
- c++ - 混合合并排序和插入排序
- flutter - 未检测到清单 Flutter PWA
- typescript - 打字稿在函数体中引用泛型 T
- sql - Postgres 从 json 列中选择特定的嵌套键