Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(gatsby): check if worker can access node created in different process #31771

Merged
merged 2 commits into from
Jun 8, 2021

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jun 4, 2021

Description

Building on #31768

This adds setup and helpers to be able to execute tests covering workerpool. This adds single test that checks if worker can get node created by different process. But main point of this PR is to setup test helpers and structure for the future.

Overview of setup:

  • createTestWorker creates actual worker (separate process)
  • packages/gatsby/src/utils/worker/__tests__/test-helpers/child-for-tests.ts is a place to add additional helper functions so tests could interact with worker that shouldn't be available in actual production worker pool
  • itWhenLMDB is just convience wrapper around jest's it to only execute tests when LMDB_STORE flag/env is set

Related Issues

[ch32034]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 4, 2021
Base automatically changed from pieh/worker-pool-types to master June 4, 2021 14:03
@pieh pieh force-pushed the pieh/worker-tests branch from 93d0c64 to 65d6fcb Compare June 4, 2021 14:04
@pieh pieh marked this pull request as ready for review June 4, 2021 14:05
@pieh pieh added topic: data Relates to source-nodes, internal-data-bridge, and node creation and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 4, 2021
@pieh pieh merged commit f92c2b0 into master Jun 8, 2021
@pieh pieh deleted the pieh/worker-tests branch June 8, 2021 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: data Relates to source-nodes, internal-data-bridge, and node creation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants