package dbapi import ( "fmt" "testing" "time" ) func TestMangosReqClient(t *testing.T){ var reqClient1 ReqrepApi var reqClient2 ReqrepApi go doRequest(reqClient1, "one") go doRequest(reqClient2, "two") time.Sleep(time.Duration(5)*time.Second) } func doRequest(client ReqrepApi, idx string){ for { msg := client.SendRequest(idx) fmt.Printf("receive msg: %s", msg) } }