Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test: add increasing integer to GetRandomNameHyphenated#19481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedAug 22, 2025
edited
Loading

Fixes flakes like the following:

workspaces_test.go:4938: Error Trace:/home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:1279/home/runner/work/coder/coder/coderd/workspaces_test.go:4938/home/runner/work/coder/coder/coderd/workspaces_test.go:5044Error:      Received unexpected error:POST http://127.0.0.1:42597/api/v2/users/me/workspaces: unexpected status code 409: Workspace "romantic-mcclintock" already exists.name: This value is already in use and should be unique.Test:       TestWorkspaceCreateWithImplicitPreset/SinglePresetWithParameters

https://github.com/coder/coder/actions/runs/17142665868/job/48633017007?pr=19464

Which are caused by insufficient randomness when creating multiple workspaces with random names. Two words is not enough to avoid flakes. We have atestutil.GetRandomName function that appends a monotonically increasing integer, but this alternative function that uses hyphens doesn't add that integer. This PR fixes that by justtestutil.GetRandomName

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ethanndicksonethanndickson changed the titletest: append increasing integer to GetRandomNameHyphenatedtest: add increasing integer to GetRandomNameHyphenatedAug 22, 2025
@ethanndicksonethanndickson marked this pull request as ready for reviewAugust 22, 2025 01:26
@ethanndicksonethanndickson merged commita71e5cc intomainAug 22, 2025
41 of 42 checks passed
@ethanndicksonethanndickson deleted the ethan/integer-get-random-name-hyphenated branchAugust 22, 2025 02:20
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@ethanndicksonethanndickson

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ethanndickson@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp