hanahmily opened a new pull request, #1150:
URL: https://github.com/apache/skywalking-banyandb/pull/1150
## What
Adds the trace equivalent of the measure program-generated integration-test
framework, establishing a golden baseline for trace queries.
### Generator (`test/cases/trace/cmd/generate`)
- **Layer 1** — criteria leaves: binary ops × value types over trace tags
(`trace_id`/`service_id`/`state`/`duration`), plus error/empty cases.
- **Layer 2** — AND/OR criteria trees at depths {1, 2, 3, 5}.
- **Layer 3** — constraint-pruned pairwise across the two trace query modes
(**traceID-lookup** via `WHERE trace_id` vs **order-based** via `ORDER BY
<index_rule>`) × order rule/direction × filter × limit × offset × projection
shape.
- Idempotent and additive (name-based gap filter never clobbers hand-written
cases); a generate-time seed-mirror check guards the in-code seed against the
JSON fixtures.
### Capture (`test/cases/trace/cmd/capture`)
- Env-gated (`CAPTURE_TRACE_WANT_FIXTURES=1`) so a routine `go test ./...`
cannot silently re-baseline goldens.
- Boots a standalone server, seeds via the shared `SeedAll`, runs the same
QL→proto round-trip the runtime verifier uses, and writes plain-string-span
`want` files.
### Harness
- Extract `casestrace.SeedAll` (called by both `init.go` and capture, so
captured goldens cannot drift from the live suite's seed), export
`MarshalToJSONWithStringBytes`, add the trace `LicenseHeader`, wire 38
generated `g.Entry` lines into `traceEntries`, and add `make
generate-trace-test-cases` / `make capture-trace-test-cases`.
## Tests
38 generated cases verified green by the standalone query integration suite.
`make generate-trace-test-cases` is idempotent; goldens reproduce
deterministically via capture.
## Notes
Builds on #1147 (merged) for the trace identity-tag projection + distributed
span-alignment fixes that the explicit-projection and multi-span generated
cases exercise.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]