Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MustGarbageCollect (0.25 sec)

  1. pkg/slices/slices_test.go

    		Junk string
    	}
    	var input []*s
    	var output []*s
    	t.Run("inner", func(t *testing.T) {
    		a := &s{"a"}
    		b := &s{"b"}
    		// Check that we can garbage collect elements when we delete them.
    		leak.MustGarbageCollect(t, b)
    		input = []*s{a, b}
    		output = Delete(input, 1)
    	})
    	assert.Equal(t, output, []*s{{"a"}})
    	assert.Equal(t, input, []*s{{"a"}, nil})
    }
    
    func TestContains(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  2. pilot/pkg/model/typed_xds_cache_test.go

    	// Since shallow copy shares the underlying array, we can use it to check.
    	cache := c.(*lruCache[uint64])
    	evictQueue := cache.evictQueue
    	for _, item := range evictQueue {
    		leak.MustGarbageCollect(t, &item)
    	}
    
    	if f == "Flush" {
    		cache.Flush()
    	} else {
    		cache.ClearAll()
    	}
    
    	// Checks that the elements referenced by the underlying array have been released.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jan 29 20:35:31 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  3. pilot/pkg/xds/ads_test.go

    func TestPushQueueLeak(t *testing.T) {
    	ds := xdsfake.NewFakeDiscoveryServer(t, xdsfake.FakeOptions{})
    	p := ds.ConnectADS()
    	p.RequestResponseAck(t, nil)
    	for _, c := range ds.Discovery.AllClients() {
    		leak.MustGarbageCollect(t, c)
    	}
    	ds.Discovery.AdsPushAll(&model.PushRequest{Push: ds.PushContext()})
    	p.Cleanup()
    }
    
    func TestDistribution(t *testing.T) {
    	xds.ResetConnectionNumberForTest()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jan 30 17:25:17 UTC 2024
    - 30.3K bytes
    - Viewed (0)
Back to top