From fc5086d55dbc347e190a0c07ee5c2f7b1641a48b Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Fri, 15 Nov 2024 11:29:57 +0530 Subject: [PATCH] test: fix test to reflect conns pool existing in this release Signed-off-by: Manan Gupta --- go/vt/vttablet/tabletserver/health_streamer_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/go/vt/vttablet/tabletserver/health_streamer_test.go b/go/vt/vttablet/tabletserver/health_streamer_test.go index a3be9b77ce1..3a53b1c642d 100644 --- a/go/vt/vttablet/tabletserver/health_streamer_test.go +++ b/go/vt/vttablet/tabletserver/health_streamer_test.go @@ -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", @@ -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()