Reconcile NoExecute Taint

This commit is contained in:
kaiyuechen
2020-03-11 23:34:53 +08:00
parent cb38560422
commit b3637c9670
3 changed files with 40 additions and 3 deletions

View File

@@ -282,6 +282,17 @@ func TestClear(t *testing.T) {
}
}
func TestSetRemove(t *testing.T) {
evictor := NewRateLimitedTimedQueue(flowcontrol.NewFakeAlwaysRateLimiter())
evictor.Add("first", "11111")
evictor.SetRemove("first")
if evictor.queue.set.Len() != 0 {
t.Fatalf("SetRemove should remove element from the set.")
}
}
func TestSwapLimiter(t *testing.T) {
evictor := NewRateLimitedTimedQueue(flowcontrol.NewFakeAlwaysRateLimiter())
fakeAlways := flowcontrol.NewFakeAlwaysRateLimiter()