Skip to content

Commit

Permalink
test: fix test to reflect conns pool existing in this release
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 committed Nov 15, 2024
1 parent ea2c0d8 commit fc5086d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion go/vt/vttablet/tabletserver/health_streamer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,9 @@ func testBlpFunc() (int64, int32) {
// TestDeadlockBwCloseAndReload tests the deadlock observed between Close and Reload
// functions. More details can be found in the issue https://github.com/vitessio/vitess/issues/17229#issuecomment-2476136610.
func TestDeadlockBwCloseAndReload(t *testing.T) {
cfg := newConfig(nil)
db := fakesqldb.New(t)
defer db.Close()
cfg := newConfig(db)
env := tabletenv.NewEnv(vtenv.NewTestEnv(), cfg, "TestNotServingPrimary")
alias := &topodatapb.TabletAlias{
Cell: "cell",
Expand All @@ -578,6 +580,7 @@ func TestDeadlockBwCloseAndReload(t *testing.T) {
// Create a new health streamer and set it to a serving primary state
hs := newHealthStreamer(env, alias, se)
hs.signalWhenSchemaChange = true
hs.InitDBConfig(&querypb.Target{TabletType: topodatapb.TabletType_PRIMARY}, cfg.DB.DbaWithDB())
hs.Open()
hs.MakePrimary(true)
defer hs.Close()
Expand Down

0 comments on commit fc5086d

Please sign in to comment.