1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

Updated test for file watcher interval param

Updated Interval Setting Priority
This commit is contained in:
ilewin
2022-09-19 20:31:24 +02:00
parent d8dc091267
commit c2f20465ab
3 changed files with 11 additions and 10 deletions

View File

@@ -1503,9 +1503,6 @@ Hello, World!
assert.NoError(t, e.Setup())
buff.Reset()
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
err := os.MkdirAll(dir+"/src", 0755)
assert.NoError(t, err)
@@ -1514,6 +1511,9 @@ Hello, World!
t.Fatal(err)
}
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
go func(ctx context.Context) {
for {
select {
@@ -1535,9 +1535,10 @@ Hello, World!
}
time.Sleep(70 * time.Millisecond)
cancel()
assert.Equal(t, expectedOutput, strings.TrimSpace(buff.String()))
buff.Reset()
err = os.RemoveAll(dir + "/.task")
assert.NoError(t, err)
err = os.RemoveAll(dir + "/src")
assert.NoError(t, err)
}