Replace context.TODO. (#1349)

This commit is contained in:
ahrav
2023-05-19 11:09:51 -07:00
committed by GitHub
parent 4ba0ad480f
commit 1da7720912
6 changed files with 30 additions and 29 deletions
+4 -4
View File
@@ -110,7 +110,7 @@ func TestSingleCommitSingleDiff(t *testing.T) {
},
}
go func() {
parser.FromReader(context.TODO(), r, commitChan)
parser.FromReader(context.Background(), r, commitChan)
}()
i := 0
for commit := range commitChan {
@@ -169,7 +169,7 @@ func TestMultiCommitContextDiff(t *testing.T) {
},
}
go func() {
NewParser().FromReader(context.TODO(), r, commitChan)
NewParser().FromReader(context.Background(), r, commitChan)
}()
i := 0
for commit := range commitChan {
@@ -199,7 +199,7 @@ func TestMaxDiffSize(t *testing.T) {
commitChan := make(chan Commit)
go func() {
parser.FromReader(context.TODO(), bigReader, commitChan)
parser.FromReader(context.Background(), bigReader, commitChan)
}()
commit := <-commitChan
@@ -236,7 +236,7 @@ func TestMessageParsing(t *testing.T) {
expectedMessage := singleCommitSingleDiffMessage
go func() {
parser.FromReader(context.TODO(), r, commitChan)
parser.FromReader(context.Background(), r, commitChan)
}()
for commit := range commitChan {
if commit.Message.String() != expectedMessage {