Просмотр исходного кода

discovery: add a overfull case for waitNodes

Xiang Li 11 лет назад
Родитель
Сommit
08ebb05335
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      discovery/discovery_test.go

+ 9 - 0
discovery/discovery_test.go

@@ -162,6 +162,15 @@ func TestWaitNodes(t *testing.T) {
 			nil,
 			all,
 		},
+		{
+			append(all, &client.Node{Key: "/1000/4", CreatedIndex: 5}),
+			3,
+			[]*client.Response{
+				{Node: &client.Node{Key: "/1000/3", CreatedIndex: 4}},
+			},
+			nil,
+			all,
+		},
 	}
 
 	for i, tt := range tests {