Skip to content

Provide an explicit per-test cleanup hook (single-env fixture) for parallel-safety #32

Description

@P3az3

Problem Statement Today each test creates its own Env::default(). This is correct but slow; some tests share storage prefix patterns and could overlap. There is no documented contract for test parallelization.

Expected Outcome Add a fixture pattern with with_campaign(prefix: &str) that sets env, registers the contract, and yields a builder the caller can use for setup. Optionally introduce per-test prefixes to allow some parallel runs if future Soroban tooling supports it.

Acceptance Criteria

  • New helper in campaign/src/test/mod.rs.
  • Existing tests can opt in (optional).
  • The fixture documents wait-for-mock_all_auths and ordering guidance.

Implementation Notes

  • Keep simple; do not force a rewrite of all tests.

Affected Files / Modules

  • campaign/src/test/mod.rs

Dependencies — None.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26developer-experienceTooling, scaffolding, contributor workflow.priority/p2Should-do in current quarter.testingTest coverage or tooling.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions