Skip to content

PR6a - fix(spec): make factory sequences unique per process#8504

Open
LWS49 wants to merge 1 commit into
lws49/feat-marketplace-pr5b-miscfrom
lws49/feat-marketplace-pr6a-factories
Open

PR6a - fix(spec): make factory sequences unique per process#8504
LWS49 wants to merge 1 commit into
lws49/feat-marketplace-pr5b-miscfrom
lws49/feat-marketplace-pr6a-factories

Conversation

@LWS49

@LWS49 LWS49 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Spec factories built a bare per-second timestamp into their sequences. Specs run with use_transactional_fixtures disabled, so two rspec processes that start within the same second generate identical values and trip unique constraints. Appending a random per-process suffix makes the sequences unique regardless of when a process starts.

Regression prevention

Covers two sequences that carried a bare timestamp: instance hosts and user email. The values only ever need to be unique, never stable or predictable, so no spec depends on their format. Exercised by every parallel rspec run.

Specs commit (use_transactional_fixtures is false), so a bare per-second
timestamp collides whenever two rspec processes start within the same second,
tripping unique constraints. Append a random suffix per process.
@LWS49
LWS49 force-pushed the lws49/feat-marketplace-pr6a-factories branch from 8e63f2b to bb91fa7 Compare July 24, 2026 04:34
@LWS49 LWS49 changed the title fix(spec): make factory sequences unique per process PR6a - fix(spec): make factory sequences unique per process Jul 24, 2026
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.

1 participant