Skip to content

Make git unit test not flaky#106

Open
bluwy wants to merge 3 commits into
mainfrom
unflake-git-unit
Open

Make git unit test not flaky#106
bluwy wants to merge 3 commits into
mainfrom
unflake-git-unit

Conversation

@bluwy

@bluwy bluwy commented Jun 12, 2026

Copy link
Copy Markdown
Member

I saw in CI this part

additions: [
{
path: "a.txt",
contents: await fixture.readFile("a.txt", "base64"),
},
{
path: "c.txt",
contents: await fixture.readFile("c.txt", "base64"),
},
{
path: "nested/file.txt",
contents: await fixture.readFile("nested/file.txt", "base64"),
},
],
could fail because the order may be non-deterministic. (c.txt before a.txt)

Added a sort to fix this. Shouldn't affect people in practice but I think it's good to sort in the implementation side so that the requests we send are also deterministic.

Comment thread src/git.ts Outdated
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.

2 participants