Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 659 for defer (0.23 sec)

  1. cni/pkg/nodeagent/net_test.go

    		},
    		Spec: corev1.PodSpec{
    			Containers: containers,
    		},
    		Status: podStatus,
    	}
    }
    
    func TestServerAddPod(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	setupLogging()
    	fixture := getTestFixure(ctx)
    	netServer := fixture.netServer
    	ztunnelServer := fixture.ztunnelServer
    	podMeta := metav1.ObjectMeta{
    		Name:      "foo",
    		Namespace: "bar",
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  2. cmd/benchmark-utils_test.go

    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	objLayer, disks, err := prepareTestBackend(ctx, instanceType)
    	if err != nil {
    		b.Fatalf("Failed obtaining Temp Backend: <ERROR> %s", err)
    	}
    	// cleaning up the backend by removing all the directories and files created on function return.
    	defer removeRoots(disks)
    
    	// uses *testing.B and the object Layer to run the benchmark.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/informers_test.go

    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestExistingPodAddedWhenNsLabeled(t *testing.T) {
    	setupLogging()
    	NodeName = "testnode"
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	pod := &corev1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "test",
    			Namespace: "test",
    		},
    		Spec: corev1.PodSpec{
    			NodeName: NodeName,
    		},
    		Status: corev1.PodStatus{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  4. internal/config/cache/cache.go

    func (c Config) MatchesSize(size int64) bool {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	return c.Enable && c.BlockSize > 0 && size <= c.BlockSize
    }
    
    // Update updates new cache frequency
    func (c *Config) Update(ncfg Config) {
    	configLock.Lock()
    	defer configLock.Unlock()
    
    	c.Enable = ncfg.Enable
    	c.Endpoint = ncfg.Endpoint
    	c.BlockSize = ncfg.BlockSize
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. internal/store/queuestore.go

    func (store *QueueStore[_]) Del(key string) error {
    	store.Lock()
    	defer store.Unlock()
    	return store.del(key)
    }
    
    // DelList - Deletes a list of entries from the store.
    // Returns an error even if one key fails to be deleted.
    func (store *QueueStore[_]) DelList(keys []string) error {
    	store.Lock()
    	defer store.Unlock()
    
    	for _, key := range keys {
    		if err := store.del(key); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  6. cmd/erasure-server-pool.go

    func (z *erasureServerPools) NSScanner(ctx context.Context, updates chan<- DataUsageInfo, wantCycle uint32, healScanMode madmin.HealScanMode) error {
    	// Updates must be closed before we return.
    	defer xioutil.SafeClose(updates)
    
    	ctx, cancel := context.WithCancel(ctx)
    	defer cancel()
    
    	var wg sync.WaitGroup
    	var mu sync.Mutex
    	var results []dataUsageCache
    	var firstErr error
    
    	allBuckets, err := z.ListBuckets(ctx, BucketOptions{})
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  7. internal/store/queuestore_test.go

    	return queueStore, nil
    }
    
    // Tear down queue store.
    func tearDownQueueStore() error {
    	return os.RemoveAll(queueDir)
    }
    
    // TestQueueStorePut - tests for store.Put
    func TestQueueStorePut(t *testing.T) {
    	defer func() {
    		if err := tearDownQueueStore(); err != nil {
    			t.Fatal("Failed to tear down store ", err)
    		}
    	}()
    	store, err := setUpQueueStore(queueDir, 100)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 04 17:52:24 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  8. internal/config/callhome/callhome.go

    // Enabled - indicates if callhome is enabled or not
    func (c *Config) Enabled() bool {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	return c.Enable
    }
    
    // FrequencyDur - returns the currently configured callhome frequency
    func (c *Config) FrequencyDur() time.Duration {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	if c.Frequency == 0 {
    		return callhomeCycleDefault
    	}
    
    	return c.Frequency
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  9. cmd/background-newdisks-heal-ops.go

    	return h
    }
    
    func (h healingTracker) getLastUpdate() time.Time {
    	h.mu.RLock()
    	defer h.mu.RUnlock()
    
    	return h.LastUpdate
    }
    
    func (h healingTracker) getBucket() string {
    	h.mu.RLock()
    	defer h.mu.RUnlock()
    
    	return h.Bucket
    }
    
    func (h *healingTracker) setBucket(bucket string) {
    	h.mu.Lock()
    	defer h.mu.Unlock()
    
    	h.Bucket = bucket
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  10. cmd/server-startup-msg_test.go

    	}
    }
    
    // Test printing server common message.
    func TestPrintServerCommonMessage(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	obj, fsDir, err := prepareFS(ctx)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(fsDir)
    	if err = newTestConfig(globalMinioDefaultRegion, obj); err != nil {
    		t.Fatal(err)
    	}
    
    	apiEndpoints := []string{"http://127.0.0.1:9000"}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 20 00:53:08 GMT 2023
    - 4K bytes
    - Viewed (0)
Back to top