dirwatch, lookup: one test below the synctest comment ran outside a bubble
check / check (push) Failing after 4m52s
check / check (push) Failing after 4m52s
In both test files the comment said every test below it runs in a synctest bubble, but one did not. That test now sits above the comment. Model: opus-5-5
This commit is contained in:
1 parent
09260591c8
commit
6dd46638a2
2 files changed
+34
-34
No files matched your search
@@ -15,6 +15,15 @@ import (
|
||||
// errWatch is an error the watch reports.
|
||||
var errWatch = errors.New("too many changes")
|
||||
|
||||
func TestDirectoryThatCannotBeWatchedIsAnError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
_, err := New(filepath.Join(t.TempDir(), "missing"))
|
||||
if err == nil {
|
||||
t.Error("a missing directory is watched, want an error")
|
||||
}
|
||||
}
|
||||
|
||||
// The tests below run callWhenQuiet in a synctest bubble, where time is a
|
||||
// clock of the test's own: time.Sleep moves it on at once, and
|
||||
// synctest.Wait returns once callWhenQuiet waits again, so that every call
|
||||
@@ -107,15 +116,6 @@ func TestErrorsOfTheWatchHandedOn(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestDirectoryThatCannotBeWatchedIsAnError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
_, err := New(filepath.Join(t.TempDir(), "missing"))
|
||||
if err == nil {
|
||||
t.Error("a missing directory is watched, want an error")
|
||||
}
|
||||
}
|
||||
|
||||
// loop is a callWhenQuiet that a test runs.
|
||||
type loop struct {
|
||||
// changes and errs send it changes and errors.
|
||||
|
||||
Reference in new issue
Block a user