mirror of https://github.com/knative/caching.git
Auto-update dependencies (#204)
Produced via: `dep ensure -update knative.dev/test-infra knative.dev/pkg` /assign n3wscott /cc n3wscott
This commit is contained in:
parent
8b0cd41569
commit
22994af264
|
@ -966,7 +966,7 @@
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
digest = "1:e71caa2e846cf80d5c362a7189f6a9276f8d60b96dd95b52a11ac321270098f6"
|
digest = "1:112a8273481730053f435aee0101436a4b59842ea09c660ee5a3647ee9fc8c7b"
|
||||||
name = "knative.dev/pkg"
|
name = "knative.dev/pkg"
|
||||||
packages = [
|
packages = [
|
||||||
"apis",
|
"apis",
|
||||||
|
@ -986,7 +986,7 @@
|
||||||
"reconciler",
|
"reconciler",
|
||||||
]
|
]
|
||||||
pruneopts = "T"
|
pruneopts = "T"
|
||||||
revision = "602d92f69b660a5a84cbe96a9be21723f6f52d3d"
|
revision = "d8b36f3593257b2b39ab9bb6fbd8ad6828983755"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
|
@ -997,7 +997,7 @@
|
||||||
"tools/dep-collector",
|
"tools/dep-collector",
|
||||||
]
|
]
|
||||||
pruneopts = "UT"
|
pruneopts = "UT"
|
||||||
revision = "279d938f5e19db2550bea7f71f4cdb97e0d84128"
|
revision = "fb2b3564c1e56cd0dadd4515f3ef0fd803da3755"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c"
|
digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c"
|
||||||
|
|
|
@ -1323,14 +1323,14 @@
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
digest = "1:d2545cd71ef3604f5d2d792e569c6e3a4df31e336d76e709b0b8bac759c0faf7"
|
digest = "1:691951c6805590983ccea7c6dbca360bcb58af5f4d60f75af9499903bb3039e9"
|
||||||
name = "knative.dev/test-infra"
|
name = "knative.dev/test-infra"
|
||||||
packages = [
|
packages = [
|
||||||
"scripts",
|
"scripts",
|
||||||
"tools/dep-collector",
|
"tools/dep-collector",
|
||||||
]
|
]
|
||||||
pruneopts = "UT"
|
pruneopts = "UT"
|
||||||
revision = "c7c50ccd8082344a5f8ea85a5ae8de59308d325c"
|
revision = "279d938f5e19db2550bea7f71f4cdb97e0d84128"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c"
|
digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c"
|
||||||
|
|
|
@ -48,8 +48,7 @@ type Source struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type SourceSpec struct {
|
type SourceSpec struct {
|
||||||
// Sink is a reference to an object that will resolve to a domain name or a
|
// Sink is a reference to an object that will resolve to a uri to use as the sink.
|
||||||
// URI directly to use as the sink.
|
|
||||||
Sink Destination `json:"sink,omitempty"`
|
Sink Destination `json:"sink,omitempty"`
|
||||||
|
|
||||||
// CloudEventOverrides defines overrides to control the output format and
|
// CloudEventOverrides defines overrides to control the output format and
|
||||||
|
|
|
@ -90,6 +90,21 @@ func CheckDistributionData(t test.T, name string, wantTags map[string]string, ex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CheckDistributionRange checks the view with a name matching string name to verify that the DistributionData stats reported
|
||||||
|
// are tagged with the tags in wantTags and that expectedCount number of records were reported.
|
||||||
|
func CheckDistributionCount(t test.T, name string, wantTags map[string]string, expectedCount int64) {
|
||||||
|
t.Helper()
|
||||||
|
if row := checkExactlyOneRow(t, name); row != nil {
|
||||||
|
checkRowTags(t, row, name, wantTags)
|
||||||
|
|
||||||
|
if s, ok := row.Data.(*view.DistributionData); !ok {
|
||||||
|
t.Error("want DistributionData", "metric", name, "got", reflect.TypeOf(row.Data))
|
||||||
|
} else if s.Count != expectedCount {
|
||||||
|
t.Error("reporter count wrong", "metric", name, "got", s.Count, "want", expectedCount)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// CheckLastValueData checks the view with a name matching string name to verify that the LastValueData stats
|
// CheckLastValueData checks the view with a name matching string name to verify that the LastValueData stats
|
||||||
// reported are tagged with the tags in wantTags and that wantValue matches reported last value.
|
// reported are tagged with the tags in wantTags and that wantValue matches reported last value.
|
||||||
func CheckLastValueData(t test.T, name string, wantTags map[string]string, wantValue float64) {
|
func CheckLastValueData(t test.T, name string, wantTags map[string]string, wantValue float64) {
|
||||||
|
|
|
@ -131,6 +131,13 @@ func (i *impl) TrackReference(ref Reference, obj interface{}) error {
|
||||||
key := types.NamespacedName{Namespace: object.GetNamespace(), Name: object.GetName()}
|
key := types.NamespacedName{Namespace: object.GetNamespace(), Name: object.GetName()}
|
||||||
|
|
||||||
i.m.Lock()
|
i.m.Lock()
|
||||||
|
// Call the callback without the lock held.
|
||||||
|
var keys []types.NamespacedName
|
||||||
|
defer func(cb func(types.NamespacedName)) {
|
||||||
|
for _, key := range keys {
|
||||||
|
cb(key)
|
||||||
|
}
|
||||||
|
}(i.cb) // read i.cb with the lock held
|
||||||
defer i.m.Unlock()
|
defer i.m.Unlock()
|
||||||
if i.exact == nil {
|
if i.exact == nil {
|
||||||
i.exact = make(map[Reference]set)
|
i.exact = make(map[Reference]set)
|
||||||
|
@ -158,7 +165,7 @@ func (i *impl) TrackReference(ref Reference, obj interface{}) error {
|
||||||
// The simplest way of eliminating such a window is to call the
|
// The simplest way of eliminating such a window is to call the
|
||||||
// callback to "catch up" immediately following new
|
// callback to "catch up" immediately following new
|
||||||
// registrations.
|
// registrations.
|
||||||
i.cb(key)
|
keys = append(keys, key)
|
||||||
}
|
}
|
||||||
// Overwrite the key with a new expiration.
|
// Overwrite the key with a new expiration.
|
||||||
l[key] = time.Now().Add(i.leaseDuration)
|
l[key] = time.Now().Add(i.leaseDuration)
|
||||||
|
@ -191,7 +198,7 @@ func (i *impl) TrackReference(ref Reference, obj interface{}) error {
|
||||||
// The simplest way of eliminating such a window is to call the
|
// The simplest way of eliminating such a window is to call the
|
||||||
// callback to "catch up" immediately following new
|
// callback to "catch up" immediately following new
|
||||||
// registrations.
|
// registrations.
|
||||||
i.cb(key)
|
keys = append(keys, key)
|
||||||
}
|
}
|
||||||
// Overwrite the key with a new expiration.
|
// Overwrite the key with a new expiration.
|
||||||
l[key] = matcher{
|
l[key] = matcher{
|
||||||
|
@ -223,6 +230,13 @@ func (i *impl) OnChanged(obj interface{}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
i.m.Lock()
|
i.m.Lock()
|
||||||
|
// Call the callbacks without the lock held.
|
||||||
|
var keys []types.NamespacedName
|
||||||
|
defer func(cb func(types.NamespacedName)) {
|
||||||
|
for _, key := range keys {
|
||||||
|
cb(key)
|
||||||
|
}
|
||||||
|
}(i.cb) // read i.cb with the lock held
|
||||||
defer i.m.Unlock()
|
defer i.m.Unlock()
|
||||||
|
|
||||||
// Handle exact matches.
|
// Handle exact matches.
|
||||||
|
@ -234,7 +248,7 @@ func (i *impl) OnChanged(obj interface{}) {
|
||||||
delete(s, key)
|
delete(s, key)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
i.cb(key)
|
keys = append(keys, key)
|
||||||
}
|
}
|
||||||
if len(s) == 0 {
|
if len(s) == 0 {
|
||||||
delete(i.exact, ref)
|
delete(i.exact, ref)
|
||||||
|
@ -253,7 +267,7 @@ func (i *impl) OnChanged(obj interface{}) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if m.selector.Matches(ls) {
|
if m.selector.Matches(ls) {
|
||||||
i.cb(key)
|
keys = append(keys, key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(s) == 0 {
|
if len(s) == 0 {
|
||||||
|
|
Loading…
Reference in New Issue