remove commented out test code

pull/5428/head
David Norton 2015-12-30 16:37:15 -05:00
parent f80f860ee5
commit 6561b702b8
1 changed files with 0 additions and 72 deletions

View File

@ -477,75 +477,3 @@ func mustParseStatement(s string) influxql.Statement {
}
return stmt
}
// Test long poll of snapshot.
// Clients will make a long poll request for a snapshot update by passing their
// current snapshot index. The meta service will respond to the request when
// its snapshot index exceeds the client's snapshot index.
// func TestMetaService_LongPoll(t *testing.T) {
// t.Parallel()
// cfg := newConfig()
// defer os.RemoveAll(cfg.Dir)
// s := newService(cfg)
// if err := s.Open(); err != nil {
// t.Fatal(err)
// }
// before, err := snapshot(s, 0)
// if err != nil {
// t.Fatal(err)
// }
// node := before.Node(1)
// if node != nil {
// t.Fatal("expected <nil> but got a node")
// }
// // Start a long poll request for a snapshot update.
// ch := make(chan *meta.Data)
// errch := make(chan error)
// go func() {
// after, err := snapshot(s, 1)
// if err != nil {
// errch <- err
// }
// ch <- after
// }()
// // Fire off an update after a delay.
// host := "127.0.0.1"
// update := make(chan struct{})
// go func() {
// <-update
// cmdval := &internal.CreateNodeCommand{
// Host: proto.String(host),
// Rand: proto.Uint64(42),
// }
// if err := exec(s, internal.Command_CreateNodeCommand, internal.E_CreateNodeCommand_Command, cmdval); err != nil {
// errch <- err
// }
// }()
// for i := 0; i < 2; i++ {
// select {
// case after := <-ch:
// node = after.Node(1)
// if node == nil {
// t.Fatal("expected node but got <nil>")
// } else if node.Host != host {
// t.Fatalf("unexpected host:\n\texp: %s\n\tgot: %s\n", host, node.Host)
// }
// case err := <-errch:
// t.Fatal(err)
// case <-time.After(time.Second):
// // First time through the loop it should time out because update hasn't happened.
// if i == 0 {
// // Signal the update
// update <- struct{}{}
// } else {
// t.Fatal("timed out waiting for snapshot update")
// }
// }
// }
// }