Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for roundTrip (0.41 sec)

  1. internal/grid/grid_test.go

    			t.Errorf("want %q, got %q", testPayload, string(resp))
    		}
    		t.Log("Roundtrip:", time.Since(start))
    	})
    
    	t.Run("localToRemoteErr", func(t *testing.T) {
    		const testPayload = "Hello Grid World!"
    		start := time.Now()
    		resp, err := remoteConn.Request(context.Background(), handlerTest2, []byte(testPayload))
    		t.Log("Roundtrip:", time.Since(start))
    		if len(resp) != 0 {
    			t.Errorf("want nil, got %q", string(resp))
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  2. pkg/apis/apps/v1beta2/defaults_test.go

    				Spec: s,
    			},
    		},
    	}
    	output := roundTrip(t, runtime.Object(rs))
    	rs2 := output.(*appsv1beta2.ReplicaSet)
    	defaultRequest := rs2.Spec.Template.Spec.Containers[0].Resources.Requests
    	requestValue := defaultRequest[v1.ResourceCPU]
    	if requestValue.String() != "0" {
    		t.Errorf("Expected 0 request value, got: %s", requestValue.String())
    	}
    }
    
    func roundTrip(t *testing.T, obj runtime.Object) runtime.Object {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  3. pkg/apis/apps/v1/defaults_test.go

    				Spec: s,
    			},
    		},
    	}
    	output := roundTrip(t, runtime.Object(rs))
    	rs2 := output.(*appsv1.ReplicaSet)
    	defaultRequest := rs2.Spec.Template.Spec.Containers[0].Resources.Requests
    	requestValue := defaultRequest[v1.ResourceCPU]
    	if requestValue.String() != "0" {
    		t.Errorf("Expected 0 request value, got: %s", requestValue.String())
    	}
    }
    
    func roundTrip(t *testing.T, obj runtime.Object) runtime.Object {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  4. pkg/apis/apps/v1beta1/defaults_test.go

    					Template:                defaultTemplate,
    				},
    			},
    		},
    	}
    
    	for _, test := range tests {
    		original := test.original
    		expected := test.expected
    		obj2 := roundTrip(t, runtime.Object(original))
    		got, ok := obj2.(*appsv1beta1.Deployment)
    		if !ok {
    			t.Errorf("unexpected object: %v", got)
    			t.FailNow()
    		}
    		if !apiequality.Semantic.DeepEqual(got.Spec, expected.Spec) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  5. pkg/api/testing/unstructured_test.go

    			if t.Failed() {
    				break
    			}
    		}
    	}
    }
    
    // TestRoundtripToUnstructured verifies the roundtrip faithfulness of all external types from native
    // to unstructured and back using both the JSON and CBOR serializers. The intermediate unstructured
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  6. src/net/http/client.go

    //
    // A RoundTripper must be safe for concurrent use by multiple
    // goroutines.
    type RoundTripper interface {
    	// RoundTrip executes a single HTTP transaction, returning
    	// a Response for the provided Request.
    	//
    	// RoundTrip should not attempt to interpret the response. In
    	// particular, RoundTrip must return err == nil if it obtained
    	// a response, regardless of the response's HTTP status code.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 06:06:11 UTC 2024
    - 33.7K bytes
    - Viewed (0)
  7. src/vendor/golang.org/x/net/nettest/conntest.go

    		t.Errorf("roundtrip SetDeadline error: %v", err)
    	}
    
    	const s = "Hello, world!"
    	buf := []byte(s)
    	if _, err := c.Write(buf); err != nil {
    		t.Errorf("roundtrip Write error: %v", err)
    	}
    	if _, err := io.ReadFull(c, buf); err != nil {
    		t.Errorf("roundtrip Read error: %v", err)
    	}
    	if string(buf) != s {
    		t.Errorf("roundtrip data mismatch: got %q, want %q", buf, s)
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go

    	resp, err := rt.upgrader.RoundTrip(req)
    	if err != nil {
    		return nil, err
    	}
    	return resp.Request, nil
    }
    
    // onewayRoundTripper captures the provided request - which is assumed to have
    // been modified by other round trippers - and then returns a fake response.
    type onewayRoundTripper struct{}
    
    // RoundTrip returns a simple 200 OK response that captures the provided request.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:10:30 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  9. pkg/apis/batch/v1/defaults_test.go

    			featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.JobPodReplacementPolicy, test.enablePodReplacementPolicy)
    			original := test.original
    			expected := test.expected
    			obj2 := roundTrip(t, runtime.Object(original))
    			actual, ok := obj2.(*batchv1.Job)
    			if !ok {
    				t.Fatalf("Unexpected object: %v", actual)
    			}
    
    			if diff := cmp.Diff(expected.Spec.Suspend, actual.Spec.Suspend); diff != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  10. pkg/spiffe/spiffe_test.go

    				t.Fatal(err)
    			}
    			if !reflect.DeepEqual(got, *tt.expected) {
    				t.Fatalf("expected %#v, got %#v", *tt.expected, got)
    			}
    
    			roundTrip := got.String()
    			if roundTrip != tt.input {
    				t.Fatalf("round trip failed, expected %q got %q", tt.input, roundTrip)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 18.1K bytes
    - Viewed (0)
Back to top