MCPcopy
hub / github.com/radondb/radon / AddForTest

Method AddForTest

src/router/frm.go:499–512  ·  view source on GitHub ↗

AddForTest used to add table config for test.

(db string, confs ...*config.TableConfig)

Source from the content-addressed store, hash-verified

497
498// AddForTest used to add table config for test.
499func (r *Router) AddForTest(db string, confs ...*config.TableConfig) error {
500 r.mu.Lock()
501 defer r.mu.Unlock()
502
503 log := r.log
504 // add config to router.
505 for _, conf := range confs {
506 if err := r.addTable(db, conf); err != nil {
507 log.Error("frm.for.test.addroute.error:%v", err)
508 return err
509 }
510 }
511 return nil
512}

Callers 15

TestPlannerFunction · 0.80
TestPlannerErrorFunction · 0.80
TestSelectPlanFunction · 0.80
TestDeletePlanFunction · 0.80
TestDeleteErrorPlanFunction · 0.80
TestUnionPlanFunction · 0.80
TestInsertPlanFunction · 0.80
TestInsertPlanSortFunction · 0.80
TestInsertPlanBenchFunction · 0.80

Calls 1

addTableMethod · 0.95

Tested by 15

TestPlannerFunction · 0.64
TestPlannerErrorFunction · 0.64
TestSelectPlanFunction · 0.64
TestDeletePlanFunction · 0.64
TestDeleteErrorPlanFunction · 0.64
TestUnionPlanFunction · 0.64
TestInsertPlanFunction · 0.64
TestInsertPlanSortFunction · 0.64
TestInsertPlanBenchFunction · 0.64