diff --git a/Client/tauri-client/src-tauri/Cargo.lock b/Client/tauri-client/src-tauri/Cargo.lock index d82b92ee..d460e07b 100644 --- a/Client/tauri-client/src-tauri/Cargo.lock +++ b/Client/tauri-client/src-tauri/Cargo.lock @@ -1766,9 +1766,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.13" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" dependencies = [ "atomic-waker", "bytes", diff --git a/Server/ws/load_soak_test.go b/Server/ws/load_soak_test.go index a00b9585..b79ddc03 100644 --- a/Server/ws/load_soak_test.go +++ b/Server/ws/load_soak_test.go @@ -112,6 +112,11 @@ func TestTheLoadTest(t *testing.T) { stopDrain chan struct{} } anchors := make([]anchor, 0, numAnchors) + // Joined explicitly after the stopDrain channels close: closing `stop` + // only makes these goroutines runnable, it does not wait for them to be + // scheduled. Without the join, goleak's bounded retry races the scheduler + // and fails on a loaded runner even though the drains do exit. + var drainWG sync.WaitGroup for i := range numAnchors { u := seedOwnerUser(t, database, fmt.Sprintf("load-anchor-%d", i)) send := make(chan []byte, 1024) @@ -122,7 +127,9 @@ func TestTheLoadTest(t *testing.T) { // full-buffer auto-disconnect (BUG-124 behavior) — that disconnect is // correct production behavior but not what this test means to probe. stop := make(chan struct{}) + drainWG.Add(1) go func(ch chan []byte, stop chan struct{}) { + defer drainWG.Done() for { select { case <-ch: @@ -285,6 +292,7 @@ func TestTheLoadTest(t *testing.T) { for _, a := range anchors { close(a.stopDrain) } + drainWG.Wait() // SendMessage fires mention-count bookkeeping with a bare `go fn()` and // deliberately does not wait for it (see MessageService.bg) — that is the