refactor: optimize fx (#1404)

* refactor: optimize fx

* chore: add more comments

* ci: make test robust
This commit is contained in:
Kevin Wan
2022-01-02 14:56:30 +08:00
committed by GitHub
parent 7cc64070b1
commit a8e7fafebf
2 changed files with 8 additions and 5 deletions

View File

@@ -567,5 +567,5 @@ func runCheckedTest(t *testing.T, fn func(t *testing.T)) {
fn(t)
// let scheduler schedule first
time.Sleep(time.Millisecond)
assert.Equal(t, goroutines, runtime.NumGoroutine())
assert.True(t, runtime.NumGoroutine() <= goroutines)
}