microsoft / microsoft/go-sqlcmd

TestIncludeFileNoExecutions is Flaky in go-sqlcmd v1.8.2

Open
#565 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

testing
Dominant language
Go
Stars
595
Forks
91
Avg merge
9h 35m
Merged PRs (30d)
1

Description

Environment

  • Go version: 1.22.0
  • go-sqlcmd version: 1.8.2
  • Operating System: Ubuntu 22.04
  • Database Server: SQL Server 2017

How to reproduce

After starting SQL Server 2017 with its credentials on Docker:

docker run -m 2GB -e ACCEPT_EULA=1 -d --name {{ .Env.SQL_SERVER_NAME }} -p:1433:1433 -e SA_PASSWORD={{ .Env.SQLCMDPASSWORD }} mcr.microsoft.com/mssql/server:2017-latest

I'm running the test in Ubuntu 22.04 with:

go test -timeout 30s -run ^TestIncludeFileNoExecutions$

Issue Description

The test TestIncludeFileNoExecutions in go-sqlcmd v1.8.2 is flaky, sometimes failing inconsistently.

Workaround

Currently we are skipping this test with:

go test -skip=^TestIncludeFileNoExecutions$

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running TestIncludeFileNoExecutions with the documented Docker SQL Server setup and the go test command. Investigate why the test fails inconsistently, then confirm it passes reliably without requiring the documented skip workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go, sql
Domain
cli, databases, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.