Skip to content

feat: Add support for optional long running tests - #314

Merged
jsonbailey merged 4 commits into
feat/fdv2from
jb/test-fallback-fdv2
Jan 30, 2026
Merged

jsonbailey merged 4 commits into
feat/fdv2from
jb/test-fallback-fdv2

Conversation

@jsonbailey

Copy link
Copy Markdown
Contributor

No description provided.

@jsonbailey
jsonbailey marked this pull request as ready for review January 30, 2026 19:37
@jsonbailey
jsonbailey requested a review from a team as a code owner January 30, 2026 19:37
Comment thread sdktests/common_tests_stream_fdv2.go Resolved
Comment thread sdktests/common_tests_stream_fdv2.go Resolved
@jsonbailey
jsonbailey merged commit 01a245c into feat/fdv2 Jan 30, 2026
4 checks passed
@jsonbailey
jsonbailey deleted the jb/test-fallback-fdv2 branch January 30, 2026 22:07
tanderson-ld added a commit that referenced this pull request Aug 18, 2026
## Summary

Ports the framework scaffolding portion of
[#314](#314)
(Jason Bailey, "fix: Add support for optional long running tests") from
v3 to v2.

## What ships

- `-enable-long-running-tests` CLI flag (default false). Mirrors the
`-enable-persistence-tests` shape.
- `EnableLongRunningTests bool` on `ldtest.TestConfiguration`.
- `(t *T) LongRunning()` method. Long-running tests call it at the top
of their body; if the flag isn't set, the test skips with reason `"use
-enable-long-running-tests to run"`.
- Threaded through `RunSDKTestSuite` and `main.go`.

## What's deliberately not ported

The original commit
([`01a245c`](01a245c))
also added 237 lines to `sdktests/common_tests_stream_fdv2.go`. That
file exercises v3-only FDv2 shapes and has no place on v2. Skipped.

## Why now

Scaffolding for follow-up work on
[#404](#404).
Review feedback there
([discussion](#404 (comment)),
[discussion](#404 (comment)))
argued against exposing an SDK-side servicedef knob to compress the
extended-regime timing in the RETRY-conformance tests. The consensus was
that those tests should run at real timing gated by the
long-running-tests mechanism — which requires that mechanism to exist on
v2 first.

Once this lands, #404 rebases onto v2 tip and its RETRY-conformance
tests get `t.LongRunning()` calls at the top of their bodies, plus
timing rewritten to production defaults.

## Verification

- `go build ./...` — clean.
- `go run . -h` — new flag visible: `-enable-long-running-tests enable
tests that take a long time to run (10+ seconds)`.
- `go test ./...` — full suite green. No behavior change to existing v2
tests since none of them call `t.LongRunning()`.

## Test plan

- [x] Confirm the port matches the shape of #314's framework portion.
- [ ] Confirm the CLI flag help text is acceptable (verbatim from
Jason's original).
- [ ] Confirm no v3-only content bled through.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> Adds optional **long-running test** gating on v2, mirroring the
existing `-enable-persistence-tests` pattern.
> 
> The harness accepts `-enable-long-running-tests` (default false). That
value flows through `main` → `RunSDKTestSuite` →
`ldtest.TestConfiguration.EnableLongRunningTests`. Tests can call
`t.LongRunning()` at the start; when the flag is off they skip with
reason `use -enable-long-running-tests to run`.
> 
> No existing v2 tests call `LongRunning()` yet, so default runs behave
the same until follow-up tests adopt the helper.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
536af50. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants