Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 108 for Petry (0.05 sec)

  1. pkg/lazy/lazy_test.go

    import (
    	"fmt"
    	"sync"
    	"testing"
    
    	"go.uber.org/atomic"
    
    	"istio.io/istio/pkg/log"
    	"istio.io/istio/pkg/slices"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestLazySerial(t *testing.T) {
    	t.Run("retry", func(t *testing.T) {
    		computations := atomic.NewInt32(0)
    		l := NewWithRetry(func() (int32, error) {
    			res := computations.Inc()
    			if res > 2 {
    				return res, nil
    			}
    
    			return res, fmt.Errorf("not yet")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 17:36:41 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. pkg/test/framework/components/namespace/kube.go

    			return err
    		}
    		err := retry.UntilSuccess(func() error {
    			_, err := c.Kube().CoreV1().ServiceAccounts(n.name).Patch(context.TODO(),
    				"default",
    				types.JSONPatchType,
    				[]byte(`[{"op": "add", "path": "/imagePullSecrets", "value": [{"name": "test-gcr-secret"}]}]`),
    				metav1.PatchOptions{})
    			return err
    		}, retry.Delay(1*time.Second), retry.Timeout(10*time.Second))
    		if err != nil {
    			return err
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 9K bytes
    - Viewed (0)
  3. pilot/pkg/config/aggregate/config_test.go

    			Meta: config.Meta{
    				GroupVersionKind: gvk.HTTPRoute,
    				Name:             "another",
    			},
    		})
    		if err != nil {
    			t.Fatal(err)
    		}
    
    		retry.UntilOrFail(t, handled.Load, retry.Timeout(time.Second))
    	})
    }
    
    func schemaFor(kind, proto string) resource.Schema {
    	return resource.Builder{
    		Kind:   kind,
    		Plural: strings.ToLower(kind) + "s",
    		Proto:  proto,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 02 17:36:47 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. security/pkg/monitoring/monitoring.go

    const (
    	TokenExchange = "token_exchange"
    	CSR           = "csr"
    )
    
    var NumOutgoingRetries = monitoring.NewSum(
    	"num_outgoing_retries",
    	"Number of outgoing retry requests (e.g. to a token exchange server, CA, etc.)",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1K bytes
    - Viewed (0)
  5. pkg/wasm/httpfetcher_test.go

    			wantNumRequest: 1,
    		},
    		{
    			name: "download retry",
    			handler: func(w http.ResponseWriter, r *http.Request, num int) {
    				if num <= 2 {
    					w.WriteHeader(http.StatusInternalServerError)
    				} else {
    					fmt.Fprintln(w, "wasm")
    				}
    			},
    			timeout:        5 * time.Second,
    			wantNumRequest: 4,
    		},
    		{
    			name: "download max retry",
    			handler: func(w http.ResponseWriter, r *http.Request, num int) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 15:56:41 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  6. pkg/kube/controllers/queue.go

    		if retryCount < q.maxAttempts {
    			q.log.Errorf("error handling %v, retrying (retry count: %d): %v", formatKey(key), retryCount, err)
    			q.queue.AddRateLimited(key)
    			// Return early, so we do not call Forget(), allowing the rate limiting to backoff
    			return true
    		}
    		q.log.Errorf("error handling %v, and retry budget exceeded: %v", formatKey(key), err)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 16:43:05 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  7. pilot/pkg/model/test/mockopenidserver.go

    	PubKeyHitNum uint64
    
    	// The mock server will return an error for the first number of hits for public key, this is used
    	// to simulate network errors and test the retry logic in jwks resolver for public key fetch.
    	ReturnErrorForFirstNumHits uint64
    
    	// The mock server will start to return an error after the first number of hits for public key,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 23 09:47:21 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  8. pkg/queue/instance.go

    	task, shuttingdown := q.get()
    	if shuttingdown {
    		return false
    	}
    
    	// Run the task.
    	if err := task.task(); err != nil {
    		delay := q.delay
    		log.Infof("Work item handle failed (%v), retry after delay %v", err, delay)
    		time.AfterFunc(delay, func() {
    			q.Push(task.task)
    		})
    	}
    	q.metrics.workDuration.Record(time.Since(task.startTime).Seconds())
    
    	return true
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jul 21 16:30:36 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  9. pilot/pkg/model/network_test.go

    		}
    	})
    
    	workingDNSServer.setFailure(false)
    	t.Run("resolution recovered", func(t *testing.T) {
    		// addresses should be updated
    		retry.UntilOrFail(t, func() bool {
    			return !reflect.DeepEqual(env.NetworkManager.AllGateways(), gateways)
    		}, retry.Timeout(10*model.MinGatewayTTL), retry.Delay(time.Millisecond*10))
    		xdsUpdater.WaitOrFail(t, "xds full")
    	})
    
    	workingDNSServer.setHosts(make(sets.String))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 16 01:18:03 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  10. tests/integration/telemetry/tracing/zipkin/server_tracing_test.go

    						}
    						if !tracing.VerifyEchoTraces(t, appNsInst.Name(), cluster.Name(), traces) {
    							return errors.New("cannot find expected traces")
    						}
    						return nil
    					}, retry.Delay(3*time.Second), retry.Timeout(80*time.Second))
    				})
    			}
    		})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top