Re-enable canLockAllJSContexts in Runtime_tests.cpp

Open
#227 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp, typescript

Research direction

Start with valdi/test/integration/Runtime_tests.cpp and the standalone test host that creates the root JS runtime. Trace how lockAllJSContexts dispatches to worker runtimes and where synchronous main-thread-to-worker dispatch is rejected. Choose one of the two approaches in the issue, remove the DISABLED_ prefix, then run the focused test and full //valdi:test_integration target.

Written by the indexing model from the issue text.

Description

RuntimeFixture.DISABLED_canLockAllJSContexts in valdi/test/integration/Runtime_tests.cpp is disabled because it aborts the whole test binary.

The standalone test runtime runs the root JS runtime on the test's main thread. lockAllJSContexts synchronously locks every worker runtime, and the runtime forbids a synchronous dispatch from the main thread to a worker, so the call aborts.

What to do, either:

  • Run the root JS runtime off the main thread in the standalone test host, or
  • Make lockAllJSContexts lock worker runtimes without a synchronous main-thread-to-worker dispatch.

Then remove the DISABLED_ prefix.

How to run

bazel test //valdi:test_integration --test_filter='*canLockAllJSContexts*' --test_arg=--gtest_also_run_disabled_tests

Done when: the test runs without DISABLED_ and the full //valdi:test_integration target passes.

See CONTRIBUTING.md before opening a pull request.

Dominant language
C++
Stars
16.4k
Forks
539
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Snapchat/Valdi

All issues in Snapchat/Valdi

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.