func newTestDB(t *testing.T) *backend.DB { newTestServer(t) f := func() { testDB, _ = backend.Open("127.0.0.1:3601", "root", "", "kingshard", 100) } testDBOnce.Do(f) return testDB }
func newTestDB(t *testing.T) *backend.DB { newTestServer(t) f := func() { testDB = backend.Open("127.0.0.1:3601", "root", "", "kingshard") testDB.SetMaxIdleConnNum(4) } testDBOnce.Do(f) return testDB }
func newTestDB(t *testing.T) *backend.DB { newTestServer(t) f := func() { var err error testDB, err = backend.Open("127.0.0.1:4000", "root", "", "kingshard") if err != nil { t.Fatal(err) } testDB.SetMaxIdleConnNum(4) } testDBOnce.Do(f) return testDB }