Some errors when running query/benchmarks

After the membership PR gets submitted, when I run the benchmarks in query, I see errors such as the following, after a while:

2016/11/03 22:58:00 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 127.0.0.1:12345: getsockopt: connection refused"; Reconnecting to {"localhost:12345" <nil>}

Strangely, when I copy the benchmarking code to cmd/dgraph, I don’t see such errors or warnings. I have tried to initialize each benchmark with a call to the following:

func prepareTest(b *testing.B) (*store.Store, string, string) {
	dir, err := ioutil.TempDir("", "storetest_")
	if err != nil {
		b.Fatal(err)
	}

	ps, err := store.NewStore(dir)
	if err != nil {
		b.Fatal(err)
	}

	schema.ParseBytes([]byte(""))
	posting.Init(ps)
	worker.Init(ps)

	worker.ParseGroupConfig("")
	dir2, err := ioutil.TempDir("", "wal_")
	if err != nil {
		b.Fatal(err)
	}
	worker.StartRaftNodes(dir2)
	time.Sleep(3 * time.Second)
	return ps, dir, dir2
}

Not sure what is wrong. This seems very similar to what is done in query_test. I will continue to tinker around, but any quick tips might be very useful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.