示例#1
0
func TestTrib(t *testing.T) {
	server := NewServer()
	tribtest.CheckServer(t, server)

	server = NewServer()
	tribtest.CheckServerConcur(t, server)
}
示例#2
0
func TestServerConcur(t *testing.T) {
	if os.Getenv("TRIB_LAB") == "lab1" {
		t.SkipNow()
	}

	addr := randaddr.Local()
	ready := make(chan bool)
	go func() {
		e := entries.ServeBackSingle(addr, store.NewStorage(), ready)
		if e != nil {
			t.Fatal(e)
		}
	}()

	<-ready

	startKeeper(t, addr)

	server := entries.MakeFrontSingle(addr)

	tribtest.CheckServerConcur(t, server)
}