frostney / frostney/GocciaScript

Run opted-in tests concurrently with a concurrency limit

Open
#1,044 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new feature runtime
Dominant language
Pascal
Stars
20
Forks
3
Avg merge
3d 4h
Merged PRs (30d)
45

Description

Summary

Support explicitly concurrent test cases with a configurable in-engine concurrency limit while preserving sequential execution by default.

Why

Independent asynchronous tests can spend most of their time waiting on promises. Opt-in bounded concurrency can reduce runtime, but it needs defined hook, microtask, statistics, and failure semantics rather than reusing file-level workers.

Current behavior

TGocciaTestAssertions.ExecuteSuite walks registered entries sequentially and updates shared test statistics/current-test state. --jobs runs separate files in parallel but cannot overlap tests within a file. Closed #114 explicitly deferred test.concurrent.

Expected behavior

  • Add an explicit concurrent test registration form; ordinary tests remain sequential.
  • Bound concurrently active test cases with a configurable limit.
  • Define suite ordering and beforeAll/afterAll/beforeEach/afterEach behavior for mixed sequential and concurrent entries.
  • Isolate per-test assertion counts, timeout state, failures, and microtask completion.
  • Keep result ordering deterministic even when completion order differs.
  • Produce equivalent behavior in interpreter and bytecode modes and compose safely with file-level --jobs.

Scope notes

  • Do not make all tests concurrent or infer concurrency from async callbacks.
  • Worker threads/process pools, cross-machine sharding, and a distributed scheduler are out of scope.
  • Retry/repeat attempt semantics are a separate issue.
  • Tests in one engine may still share explicitly imported mutable state; the API must document that boundary rather than silently cloning the runtime.

Contributor guide

Open the contributing guide

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.

Research direction

Start at TGocciaTestAssertions.ExecuteSuite and trace registered-entry execution, shared statistics/current-test state, and the existing --jobs path. Define the opt-in API and bounded scheduling semantics there, then add coverage for mixed ordering, hooks, microtasks, failures, deterministic results, interpreter/bytecode parity, and --jobs composition.

Written by the indexing model from the issue text.

Assessment

Domain
backend, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.