mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Deflake operation listing.
This commit is contained in:
parent
e1a361a84b
commit
52473bdf11
@ -92,7 +92,15 @@ func TestOperation(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOperationsList(t *testing.T) {
|
||||
simpleStorage := &SimpleRESTStorage{}
|
||||
testOver := make(chan struct{})
|
||||
defer close(testOver)
|
||||
simpleStorage := &SimpleRESTStorage{
|
||||
injectedFunction: func(obj interface{}) (interface{}, error) {
|
||||
// Eliminate flakes by ensuring the create operation takes longer than this test.
|
||||
<-testOver
|
||||
return obj, nil
|
||||
},
|
||||
}
|
||||
handler := Handle(map[string]RESTStorage{
|
||||
"foo": simpleStorage,
|
||||
}, codec, "/prefix/version")
|
||||
|
Loading…
Reference in New Issue
Block a user