Skip to content

Share study containers across TreatmentManager container scoping tests - #296

Merged
labkey-jeckels merged 4 commits into
developfrom
fb_test_helpers
Nov 25, 2026
Merged

labkey-jeckels merged 4 commits into
developfrom
fb_test_helpers

Conversation

@labkey-jeckels

Copy link
Copy Markdown
Contributor

Rationale

Speed up a slow BVT server-side test: the two TreatmentManager container scoping tests each created and deleted their own pair of study containers.

Related Pull Requests

Changes

  • Create the study containers once per test class and share them between the two container scoping tests

@labkey-jeckels
labkey-jeckels marked this pull request as ready for review November 23, 2026 01:45
@labkey-jeckels
labkey-jeckels requested a review from a team November 24, 2026 02:11
@labkey-jeckels labkey-jeckels self-assigned this Nov 24, 2026

@labkey-adam labkey-adam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that we're speeding this up, but we really shouldn't put these tests in the BVT. Seems like Daily or Weekly would be sufficient.

labkey-jeckels added a commit to LabKey/testAutomation that referenced this pull request Nov 25, 2026
)

## Rationale
Give module tests a shared home for request cancellation checks and the
samples query schema name, which two test classes had copied and several
redeclared.

## Related Pull Requests
- LabKey/platform#8367
- LabKey/limsModules#2618
- LabKey/labkey-workspaces#81
- LabKey/customModules#296

## Changes
- Add a helper for waiting on the notification WebSocket and reading
request cancel metrics
- Add a constant for the samples query schema name
labkey-jeckels added a commit to LabKey/platform that referenced this pull request Nov 25, 2026
…low BVT tests (#8367)

## Rationale
Make server-side integration tests easier to write and faster to run.
Many recently added tests hand-roll the same container, user, sample
type, and update-service setup, hard-coded names that already had
constants, and repeated near-identical test methods. Separately, the
slowest server-side test classes in BVT-B spend most of their time in
fixed sleeps, timeouts, and repeated container and study setup rather
than in the code they verify.

## Related Pull Requests
- LabKey/limsModules#2618
- LabKey/testAutomation#3313
- LabKey/labkey-workspaces#81
- LabKey/customModules#296

## Changes
- Add shared test helpers for running work on a separate request thread,
writing rows through a query update service, creating sample types, and
skipping tests by database or assertion mode
- Extend the container-scoping test base with throwaway projects,
restricted folders, and role grants to groups
- Move recently added tests onto the shared helpers and production
constants
- Fold near-duplicate test methods into table-driven tests that assert
the same cases
- Share containers across a class's tests where each test only checks
its own data
- Shorten fixed sleeps and waits in the slowest BVT tests, with
test-only overrides for the stuck async worker timeout and the request
timeout sweep interval
- Flush detailed audit events on the shared row batch size, so its test
can cross batch boundaries with a few rows
- Wait for the file watcher events the test asserts rather than
OS-specific event counts

## Tasks
- [x] Claude Code Review
- [x] Manual Testing - N/A
- [x] Test Automation
@labkey-jeckels
labkey-jeckels merged commit e6494de into develop Nov 25, 2026
8 checks passed
@labkey-jeckels
labkey-jeckels deleted the fb_test_helpers branch November 25, 2026 23:49
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