mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-26 10:23:28 +08:00
Go: add context (#17314)
### Summary As title. --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestOfficeParsers_ParseWithResult_NoCGO(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
ctx := t.Context()
|
||||
cases := []struct {
|
||||
name string
|
||||
res ParseResult
|
||||
|
||||
@@ -9,9 +9,8 @@ import (
|
||||
)
|
||||
|
||||
func TestPDFParser_ParseWithResult_NoCGO(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
pdf := NewPDFParser()
|
||||
|
||||
ctx := t.Context()
|
||||
empty := pdf.ParseWithResult(ctx, "empty.pdf", nil)
|
||||
if empty.Err != nil {
|
||||
t.Fatalf("empty input: want nil err, got %v", empty.Err)
|
||||
|
||||
Reference in New Issue
Block a user