mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
deflake quota master init order
This commit is contained in:
@@ -52,9 +52,11 @@ import (
|
|||||||
func TestQuota(t *testing.T) {
|
func TestQuota(t *testing.T) {
|
||||||
framework.DeleteAllEtcdKeys()
|
framework.DeleteAllEtcdKeys()
|
||||||
|
|
||||||
|
initializationCh := make(chan struct{})
|
||||||
// Set up a master
|
// Set up a master
|
||||||
var m *master.Master
|
var m *master.Master
|
||||||
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
<-initializationCh
|
||||||
m.Handler.ServeHTTP(w, req)
|
m.Handler.ServeHTTP(w, req)
|
||||||
}))
|
}))
|
||||||
// TODO: Uncomment when fix #19254
|
// TODO: Uncomment when fix #19254
|
||||||
@@ -71,6 +73,7 @@ func TestQuota(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Error in bringing up the master: %v", err)
|
t.Fatalf("Error in bringing up the master: %v", err)
|
||||||
}
|
}
|
||||||
|
close(initializationCh)
|
||||||
|
|
||||||
go replicationcontroller.NewReplicationManagerFromClient(clientset, controller.NoResyncPeriodFunc, replicationcontroller.BurstReplicas, 4096).
|
go replicationcontroller.NewReplicationManagerFromClient(clientset, controller.NoResyncPeriodFunc, replicationcontroller.BurstReplicas, 4096).
|
||||||
Run(3, wait.NeverStop)
|
Run(3, wait.NeverStop)
|
||||||
|
Reference in New Issue
Block a user