mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
- Add syncutil package with deadlock-detecting mutex (build-tag switchable) - Add main_test.go TestMain scaffolding across all server packages - Harden concurrency in ws, admin, auth, and updater packages - Update CI workflow, go.mod/sum, Cargo.lock, and root changelogen tooling
17 lines
417 B
Go
17 lines
417 B
Go
package api_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"go.uber.org/goleak"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
goleak.VerifyTestMain(m,
|
|
// Hub.Run starts long-lived goroutines that are stopped via Hub.Stop().
|
|
// API tests create routers (which start hubs) but don't always call
|
|
// Stop() — these are expected background goroutines, not leaks.
|
|
goleak.IgnoreTopFunction("github.com/owncord/server/ws.(*Hub).Run.func1"),
|
|
)
|
|
}
|