Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for NewCycleState (0.29 sec)

  1. pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions_test.go

    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			ctx, cancel := context.WithCancel(context.Background())
    			defer cancel()
    			p := newPlugin(ctx, t)
    			cycleState := framework.NewCycleState()
    			_, preFilterGotStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod)
    			if diff := cmp.Diff(test.preFilterWantStatus, preFilterGotStatus); diff != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 20 17:40:39 UTC 2023
    - 17.3K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/cycle_state.go

    	SkipFilterPlugins sets.Set[string]
    	// SkipScorePlugins are plugins that will be skipped in the Score extension point.
    	SkipScorePlugins sets.Set[string]
    }
    
    // NewCycleState initializes a new CycleState and returns its pointer.
    func NewCycleState() *CycleState {
    	return &CycleState{}
    }
    
    // ShouldRecordPluginMetrics returns whether metrics.PluginExecutionDuration metrics should be recorded.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 06:48:20 UTC 2023
    - 4K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/autoscaler_contract/framework_contract_test.go

    	if f, _ = runtime.NewFramework(ctx, nil, nil); f != nil {
    		_, ok := f.(framework.Framework)
    		assert.True(t, ok)
    	}
    }
    
    func TestNewCycleState(t *testing.T) {
    	var state interface{} = framework.NewCycleState()
    	_, ok := state.(*framework.CycleState)
    	assert.True(t, ok)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 23 02:17:34 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/volumezone/volume_zone_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()
    			node := &framework.NodeInfo{}
    			node.SetNode(test.Node)
    			p := &VolumeZone{
    				pvLister,
    				pvcLister,
    				nil,
    			}
    			_, preFilterStatus := p.PreFilter(ctx, state, test.Pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 05:17:04 UTC 2023
    - 20K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/nodeports/node_ports_test.go

    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			p, err := New(ctx, nil, nil)
    			if err != nil {
    				t.Fatalf("creating plugin: %v", err)
    			}
    			cycleState := framework.NewCycleState()
    			_, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod)
    			if diff := cmp.Diff(test.wantPreFilterStatus, preFilterStatus); diff != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 11:02:11 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_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(test.existingPods, test.nodes)
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    
    			p, err := NewFit(ctx, &config.NodeResourcesFitArgs{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/cycle_state_test.go

    // createCycleStateWithFakeData creates *CycleState with fakeData.
    // The given data is used in stored fakeData.
    func createCycleStateWithFakeData(data string, recordPluginMetrics bool) *CycleState {
    	c := NewCycleState()
    	c.Write(key, &fakeData{
    		data: data,
    	})
    	c.SetRecordPluginMetrics(recordPluginMetrics)
    	return c
    }
    
    // isCycleStateEqual returns whether two CycleState, which has fakeData in storage, is equal or not.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 14 15:26:20 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. pkg/scheduler/framework/plugins/imagelocality/image_locality_test.go

    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			snapshot := cache.NewSnapshot(nil, test.nodes)
    			state := framework.NewCycleState()
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    
    			p, err := New(ctx, nil, fh)
    			if err != nil {
    				t.Fatalf("creating plugin: %v", err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 19 06:17:57 UTC 2024
    - 10.3K bytes
    - Viewed (0)
Back to top