Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for NewCycleState (0.4 sec)

  1. pkg/scheduler/framework/plugins/noderesources/fit_test.go

    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			p, err := NewFit(ctx, &test.args, nil, plfeature.Features{})
    			if err != nil {
    				t.Fatal(err)
    			}
    			cycleState := framework.NewCycleState()
    			_, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod)
    			if !preFilterStatus.IsSuccess() {
    				t.Errorf("prefilter failed with status: %v", preFilterStatus)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 57.4K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/preemption/preemption_test.go

    			})
    
    			fakePostPlugin := &FakePostFilterPlugin{numViolatingVictim: tt.numViolatingVictim}
    
    			for cycle, pod := range tt.testPods {
    				state := framework.NewCycleState()
    				pe := Evaluator{
    					PluginName: "FakePostFilter",
    					Handler:    fwk,
    					Interface:  fakePostPlugin,
    					State:      state,
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/runtime/framework_test.go

    			)
    			if err != nil {
    				t.Fatalf("Failed to create framework for testing: %v", err)
    			}
    
    			state := framework.NewCycleState()
    			status := f.RunPreScorePlugins(ctx, state, nil, nil)
    			if status.Code() != tt.wantStatusCode {
    				t.Errorf("wrong status code. got: %v, want: %v", status, tt.wantStatusCode)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 103K bytes
    - Viewed (0)
  4. pkg/scheduler/schedule_one_test.go

    			}
    			sched.applyDefaultHandlers()
    
    			informerFactory.Start(ctx.Done())
    			informerFactory.WaitForCacheSync(ctx.Done())
    
    			result, err := sched.SchedulePod(ctx, fwk, framework.NewCycleState(), test.pod)
    			if err != test.wErr {
    				gotFitErr, gotOK := err.(*framework.FitError)
    				wantFitErr, wantOK := test.wErr.(*framework.FitError)
    				if gotOK != wantOK {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    		},
    	}
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			snapshot := cache.NewSnapshot(nil, test.nodes)
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    
    			p, err := New(ctx, nil, fh, feature.Features{})
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/defaultpreemption/default_preemption_test.go

    				fh:        f,
    				podLister: informerFactory.Core().V1().Pods().Lister(),
    				pdbLister: getPDBLister(informerFactory),
    				args:      *getDefaultDefaultPreemptionArgs(),
    			}
    
    			state := framework.NewCycleState()
    			// Ensure <state> is populated.
    			if _, status := f.RunPreFilterPlugins(ctx, state, tt.pod); !status.IsSuccess() {
    				t.Errorf("Unexpected PreFilter Status: %v", status)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 82.8K bytes
    - Viewed (0)
  7. pkg/scheduler/schedule_one.go

    		return
    	}
    
    	logger.V(3).Info("Attempting to schedule pod", "pod", klog.KObj(pod))
    
    	// Synchronously attempt to find a fit for the pod.
    	start := time.Now()
    	state := framework.NewCycleState()
    	state.SetRecordPluginMetrics(rand.Intn(100) < pluginMetricsSamplePercent)
    
    	// Initialize an empty podsToActivate struct, which will be filled up by plugins or stay empty.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 13:28:08 UTC 2024
    - 43.4K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go

    	for _, node := range nodes {
    		nodeInfo := framework.NewNodeInfo()
    		nodeInfo.SetNode(node)
    		tc.nodeInfos = append(tc.nodeInfos, nodeInfo)
    	}
    	tc.state = framework.NewCycleState()
    
    	return tc
    }
    
    // createReactor implements the logic required for the UID and ResourceVersion
    // fields to work when using the fake client. Add it with client.PrependReactor
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 07:57:10 UTC 2024
    - 61.9K bytes
    - Viewed (0)
Back to top