Skip to content

Commit 3d34282

Browse files
committed
test(opensearchtransport): confine the poller reaping guard to the unit binary
TestCloseReapsBackgroundPollers asserts the poller frames are gone from the process-wide runtime.Stack dump after Close. That only holds where no other live transport is polling, the same constraint that already keeps the zero-allocation assertions out of the live-cluster binaries, so this file now carries !integration too. The doc comment states the constraint once and covers both the build tag and the absence of t.Parallel. Signed-off-by: Ryan Yuan <ryan.yuan@crowdstrike.com>
1 parent 3a91a06 commit 3d34282

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

opensearchtransport/close_pollers_internal_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// this file be licensed under the Apache-2.0 license or a
55
// compatible open source license.
66

7+
//go:build !integration
8+
79
package opensearchtransport
810

911
import (
@@ -47,8 +49,10 @@ func goroutineDumpHas(frame string) bool {
4749
// Close stops reaping these goroutines, this test fails directly instead of
4850
// surfacing as an unrelated flake.
4951
//
50-
// Deliberately not parallel: it reads the process-wide goroutine dump, which is
51-
// only quiet while no parallel sibling is running.
52+
// The post-Close assertion reads the process-wide goroutine dump, so it only
53+
// holds in a binary where no other live transport is polling. The !integration
54+
// constraint on this file keeps it out of the live-cluster binaries, and the
55+
// absence of t.Parallel keeps siblings in this one from overlapping with it.
5256
func TestCloseReapsBackgroundPollers(t *testing.T) {
5357
pollers := []struct {
5458
name string

0 commit comments

Comments
 (0)