Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

test: TestCloseAllJoinsStandingTickerAndLaterProcessCanStart flakes on TempDir cleanup (directory not empty)

Aberta
#1,499 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
72/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
go
Domínio
cli, testing-qa

Direção de pesquisa

Start with TestCloseAllJoinsStandingTickerAndLaterProcessCanStart in cmd/codeaf and run the provided go test command repeatedly. Trace closeAll and the background writer started by v3TestProcess, including the standing ticker, to find what can outlive closeAll. Done means the test passes at -count=200 and no writer touches the test temp tree after closeAll returns.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

area:tests bug

What happened

touched packages on PR #1438 went red on cmd/codeaf (2026-09-24, CI run 36037211855). The PR's only cmd/codeaf change is one new case in update_test.go; the failing test is elsewhere in the package:

--- FAIL: TestCloseAllJoinsStandingTickerAndLaterProcessCanStart (0.13s)
    testing.go:1464: TempDir RemoveAll cleanup: unlinkat /tmp/codeaf-ci/TestCloseAllJoinsStandingTickerAndLaterProcessCanStart1246116880/003: directory not empty
FAIL	github.com/Agent-Field/codeaf/cmd/codeaf	98.730s

Every assertion in the test passes. What fails is t.TempDir()'s own cleanup: something writes into one of the test's temp directories while Go is removing it, after closeAll() has returned. So some writer outlives closeAll, either the later process's standing ticker or another background writer v3TestProcess starts.

Replication

Deterministic (no model). On dev@c26ea9c98, with no other change:

go test -count=30 -run '^TestCloseAllJoinsStandingTickerAndLaterProcessCanStart$' ./cmd/codeaf/

This failed 1 time in 30 on a laptop, with the same TempDir RemoveAll cleanup … directory not empty line. Raising -count makes it show up more reliably.

Field (real models). Not applicable.

Acceptance

  • go test -count=200 -run '^TestCloseAllJoinsStandingTickerAndLaterProcessCanStart$' ./cmd/codeaf/ passes. The fix should make whatever writes into the test's temp tree after closeAll() returns stop before it returns, rather than retrying the cleanup or skipping the check. The test exists to prove that nothing writes after Close.
Linguagem predominante
Go
Estrelas
115
Forks
14
Merge médio
9h 35min
PRs com merge (30d)
752

Preparar o ambiente

Ainda não verificamos os arquivos de configuração deste projeto. Comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Agent-Field/CodeAF

Todas as issues de Agent-Field/CodeAF

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.