Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for asError (0.34 sec)

  1. pkg/scheduler/framework/plugins/podtopologyspread/filtering_test.go

    			if _, s := p.PreFilter(ctx, cs, tt.preemptor); !s.IsSuccess() {
    				t.Fatal(s.AsError())
    			}
    			nodeInfo, err := snapshot.Get(tt.nodes[tt.nodeIdx].Name)
    			if err != nil {
    				t.Fatal(err)
    			}
    			if s := p.AddPod(ctx, cs, tt.preemptor, mustNewPodInfo(t, tt.addedPod), nodeInfo); !s.IsSuccess() {
    				t.Fatal(s.AsError())
    			}
    			state, err := getPreFilterState(cs)
    			if err != nil {
    				t.Fatal(err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 10:42:29 UTC 2024
    - 143.1K bytes
    - Viewed (0)
  2. pkg/scheduler/schedule_one_test.go

    			}
    			sched.FailureHandler = func(_ context.Context, fwk framework.Framework, p *framework.QueuedPodInfo, status *framework.Status, _ *framework.NominatingInfo, _ time.Time) {
    				gotPod = p.Pod
    				gotError = status.AsError()
    
    				msg := truncateMessage(gotError.Error())
    				fwk.EventRecorder().Eventf(p.Pod, nil, v1.EventTypeWarning, "FailedScheduling", "Scheduling", msg)
    			}
    			called := make(chan struct{})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
  3. pkg/kubelet/eviction/helpers_test.go

    		}
    	}
    }
    
    func TestParsePercentage(t *testing.T) {
    	testCases := map[string]struct {
    		hasError bool
    		value    float32
    	}{
    		"blah": {
    			hasError: true,
    		},
    		"25.5%": {
    			value: 0.255,
    		},
    		"foo%": {
    			hasError: true,
    		},
    		"12%345": {
    			hasError: true,
    		},
    	}
    	for input, expected := range testCases {
    		value, err := parsePercentage(input)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 23:14:12 UTC 2024
    - 106.7K bytes
    - Viewed (0)
Back to top