Commit 7183025
authored
fix(tests): migrate NexusApiTestSuite to parallelsuite, fix versioning flag and query pagination (#9910)
## What changed?
Two test fixes targeting consistent CI failures across all recent runs,
plus a migration of `NexusApiTestSuite` to `parallelsuite`.
## Why?
Both failures reproduced in 9–10/10 of the last 10 CI runs:
**1.
`TestNexusStartOperation_WithNamespaceAndTaskQueue_SupportsVersioning`**
(10/10 runs)
The test calls `UpdateWorkerBuildIdCompatibility`, which is the v0.1
(Version Set / Build ID compat) API gated by
`FrontendEnableWorkerVersioningDataAPIs`. The test only enabled
`FrontendEnableWorkerVersioningRuleAPIs` (the v0.2 Rules API), so the
v0.1 call was rejected with a `PermissionDenied` error.
**2. `TestQueryWorkflow_NonStickyMultiPageHistory`** (9/10 runs)
The test asserted `NextPageToken != nil` after fetching workflow
history. The shared functional test cluster sets
`SendRawHistoryBetweenInternalServices=true` (in
`tests/testcore/dynamic_config_overrides.go`), which causes the history
service to return all events in one shot — making `NextPageToken` always
nil regardless of the `MatchingHistoryMaxPageSize=2` override.
## How did you test it?
**Fix 1 — nexus versioning test (`tests/nexus_api_test.go`):**
Added
`env.OverrideDynamicConfig(dynamicconfig.FrontendEnableWorkerVersioningDataAPIs,
true)` alongside the existing `RuleAPIs` override so the v0.1 API is
available for the test.
Also migrated `NexusApiTestSuite` from the custom `NexusTestBaseSuite`
(which used a `useTemporalFailures` field mutated before `suite.Run`) to
`parallelsuite.Suite[*NexusApiTestSuite]`. The `useTemporalFailures`
flag is now a typed parameter passed through `parallelsuite.Run`,
eliminating shared mutable state between the two suite invocations.
**Fix 2 — query pagination test (`tests/query_workflow_test.go`):**
Extracted `TestQueryWorkflow_NonStickyMultiPageHistory` from
`QueryWorkflowSuite` into a standalone top-level test that uses
`testcore.NewEnv` with:
- `testcore.WithDedicatedCluster()` — isolated cluster not affected by
the global config override
-
`testcore.WithDynamicConfig(dynamicconfig.SendRawHistoryBetweenInternalServices,
false)` — disables raw history so pagination happens normally
- `testcore.WithDynamicConfig(dynamicconfig.MatchingHistoryMaxPageSize,
2)` — forces multi-page history
- [x] built
- [x] added new functional test(s) (standalone query test)
- [x] covered by existing tests (nexus suite)
## Potential risks
The `NexusApiTestSuite` migration to `parallelsuite` changes how
`useTemporalFailures` is threaded through tests. The two existing
top-level runners (`TestNexusApiTestSuiteWithLegacyErrorPaths` /
`WithTemporalFailures`) are preserved; the flag is now a
compile-time-checked parameter rather than a struct field.1 parent c20b4bb commit 7183025
3 files changed
Lines changed: 49 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
614 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
615 | 620 | | |
616 | 621 | | |
617 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
351 | 358 | | |
352 | 359 | | |
353 | 360 | | |
| |||
365 | 372 | | |
366 | 373 | | |
367 | 374 | | |
| 375 | + | |
368 | 376 | | |
369 | | - | |
| 377 | + | |
370 | 378 | | |
371 | 379 | | |
372 | | - | |
| 380 | + | |
373 | 381 | | |
374 | 382 | | |
375 | | - | |
| 383 | + | |
376 | 384 | | |
377 | | - | |
| 385 | + | |
378 | 386 | | |
379 | | - | |
| 387 | + | |
380 | 388 | | |
381 | 389 | | |
382 | | - | |
383 | | - | |
| 390 | + | |
| 391 | + | |
384 | 392 | | |
385 | 393 | | |
386 | | - | |
387 | | - | |
388 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
389 | 397 | | |
390 | 398 | | |
391 | 399 | | |
| |||
395 | 403 | | |
396 | 404 | | |
397 | 405 | | |
398 | | - | |
| 406 | + | |
| 407 | + | |
399 | 408 | | |
400 | 409 | | |
401 | 410 | | |
402 | | - | |
| 411 | + | |
403 | 412 | | |
404 | 413 | | |
405 | | - | |
406 | | - | |
407 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
408 | 417 | | |
409 | 418 | | |
410 | 419 | | |
411 | 420 | | |
412 | 421 | | |
413 | | - | |
414 | | - | |
| 422 | + | |
| 423 | + | |
415 | 424 | | |
416 | 425 | | |
417 | 426 | | |
418 | | - | |
419 | | - | |
| 427 | + | |
| 428 | + | |
420 | 429 | | |
421 | 430 | | |
422 | 431 | | |
423 | | - | |
424 | | - | |
| 432 | + | |
| 433 | + | |
425 | 434 | | |
426 | 435 | | |
427 | 436 | | |
| |||
0 commit comments