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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user