Skip to main content

skip-test-with-issue

Skip a flaky or broken test with proper issue tracking. Use when asked to skip a test, disable a test, or mark a test as flaky.

소스 정보

저장소
cockroachdb/cockroach
최근 소스 활동
2026년 4월 6일 17:58
감지된 SKILL.md 언어
영어
스타
32,570
포크
4,131

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
skip-test-with-issue
description
Skip a flaky or broken test with proper issue tracking. Use when asked to skip a test, disable a test, or mark a test as flaky.
# Skip a Flaky Test Use `skip.WithIssue` from `"github.com/cockroachdb/cockroach/pkg/testutils/skip"` to skip a test with a tracking issue number. ## Usage Ask the user for the GitHub issue number, then add the skip after the defer statements: ```go func TestFlakyTest(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) skip.WithIssue(t, 167182, "flaky due to timeout") // test body... } ``` ## Other Common Skip Variants The `skip` package provides several other incantations for conditional skips: - `skip.UnderRace(t, issueNum, "reason")` - skip only when running with race detector - `skip.UnderDeadlock(t, issueNum, "reason")` - skip only when running with deadlock detector - `skip.UnderDuress(t, issueNum, "reason")` - skip only when running under stress/duress Use these when a test is flaky only under specific conditions rather than universally broken. ## Notes - Issue number is an integer, not a string - Place skip call after defer statements, before test body - Be specific in reason: "flaky due to timeout" not just "flaky" - Multiple tests with same root cause can share an issue number - Ensure the `skip` package is imported - Run `crlfmt -w -tab 2 <file>` after editing
GitHub에서 보기